export PWD on windows to fix broken build

cc #591
This commit is contained in:
Gokcehan 2021-04-04 18:30:00 +03:00
parent ca0068514a
commit 229b7b1ade

View File

@ -134,7 +134,7 @@ func errCrossDevice(err error) bool {
return err.(*os.LinkError).Err.(syscall.Errno) == 17
}
func exportFiles(f string, fs []string) {
func exportFiles(f string, fs []string, pwd string) {
envFile := fmt.Sprintf(`"%s"`, f)
var quotedFiles []string
@ -145,6 +145,7 @@ func exportFiles(f string, fs []string) {
os.Setenv("f", envFile)
os.Setenv("fs", envFiles)
os.Setenv("PWD", pwd)
if len(fs) == 0 {
os.Setenv("fx", envFile)