From d4b2c04b1e5c26803b2640f3f9c6ba54ba8b5358 Mon Sep 17 00:00:00 2001 From: andyzhangx Date: Thu, 19 Sep 2024 06:17:40 +0000 Subject: [PATCH] fix: inherit os environment when calling blobfuse2 in blobfuse-proxy --- pkg/blobfuse-proxy/server/server.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkg/blobfuse-proxy/server/server.go b/pkg/blobfuse-proxy/server/server.go index 178062eb2..7000ecdbd 100644 --- a/pkg/blobfuse-proxy/server/server.go +++ b/pkg/blobfuse-proxy/server/server.go @@ -20,6 +20,7 @@ import ( "context" "fmt" "net" + "os" "os/exec" "strings" "sync" @@ -85,7 +86,7 @@ func (server *MountServer) MountAzureBlob(_ context.Context, cmd = exec.Command("blobfuse", strings.Split(args, " ")...) } - cmd.Env = append(cmd.Env, authEnv...) + cmd.Env = append(os.Environ(), authEnv...) output, err := cmd.CombinedOutput() if err != nil { klog.Error("blobfuse mount failed: with error:", err.Error())