We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent dd78bc0 commit 4576184Copy full SHA for 4576184
src/cmd/go/internal/envcmd/env_test.go
@@ -69,16 +69,15 @@ func FuzzPrintEnvEscape(f *testing.F) {
69
if runtime.GOOS == "windows" {
70
scriptfilename = "script.bat"
71
}
72
- scriptfile := filepath.Join(t.TempDir(), scriptfilename)
73
- if err := os.WriteFile(scriptfile, b.Bytes(), 0777); err != nil {
74
- t.Fatal(err)
75
- }
76
- t.Log(b.String())
77
var cmd *exec.Cmd
78
+ scriptfile := filepath.Join(t.TempDir(), scriptfilename)
+ if err := os.WriteFile(scriptfile, b.Bytes(), 0777); err != nil {
+ t.Fatal(err)
+ }
79
cmd = testenv.Command(t, "cmd.exe", "/C", scriptfile)
80
} else {
81
- cmd = testenv.Command(t, "sh", "-c", scriptfile)
+ cmd = testenv.Command(t, "sh", "-c", b.String())
82
83
out, err := cmd.Output()
84
t.Log(string(out))
0 commit comments