From 1bb7a17c81ac3ff2c23fafa7d651ecccab85d883 Mon Sep 17 00:00:00 2001 From: Gokcehan Date: Wed, 26 Jan 2022 17:22:46 +0300 Subject: [PATCH] quote PWD variable on windows cc #740 --- os_windows.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/os_windows.go b/os_windows.go index 306ffa6e..ed6f05ad 100644 --- a/os_windows.go +++ b/os_windows.go @@ -147,9 +147,11 @@ func exportFiles(f string, fs []string, pwd string) { } envFiles := strings.Join(quotedFiles, gOpts.filesep) + envPWD := fmt.Sprintf(`"%s"`, pwd) + os.Setenv("f", envFile) os.Setenv("fs", envFiles) - os.Setenv("PWD", pwd) + os.Setenv("PWD", envPWD) if len(fs) == 0 { os.Setenv("fx", envFile)