From e454d9479acfd06600ad1bd54e515ec13fd7dc5e 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 b517ee234..ee45c1c11 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())