Skip to content

Commit 9fdff48

Browse files
committed
internal/vcs: remove SYSTEMROOT workaround for Windows
https://go.dev/issue/25513 was resolved in Go 1.13 such that %SYSTEMROOT% is always inherited by sub-processes by default.
1 parent 5223eff commit 9fdff48

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

testscript/testscript.go

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -494,16 +494,10 @@ func (ts *TestScript) setup() string {
494494
env.Vars = append(env.Vars, name+"="+val)
495495
}
496496
}
497-
// Must preserve SYSTEMROOT on Windows: https://github.com/golang/go/issues/25513 et al
498497
if runtime.GOOS == "windows" {
499-
env.Vars = append(env.Vars,
500-
"SYSTEMROOT="+os.Getenv("SYSTEMROOT"),
501-
"exe=.exe",
502-
)
498+
env.Vars = append(env.Vars, "exe=.exe")
503499
} else {
504-
env.Vars = append(env.Vars,
505-
"exe=",
506-
)
500+
env.Vars = append(env.Vars, "exe=")
507501
}
508502
ts.cd = env.Cd
509503
// Unpack archive.

0 commit comments

Comments
 (0)