]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/go: prefix calls to Windows rmdir with cmd.exe
authorJason A. Donenfeld <Jason@zx2c4.com>
Mon, 25 Nov 2019 18:23:44 +0000 (19:23 +0100)
committerJason A. Donenfeld <Jason@zx2c4.com>
Mon, 25 Nov 2019 19:02:50 +0000 (19:02 +0000)
rmdir is a built-in of cmd.exe. It's also an alias in powershell.exe. We
want always the cmd.exe on, so specify it explicitly.

Fixes #35813

Change-Id: I89723e993ee26a20b42d03b8a725ff10ccf30505
Reviewed-on: https://go-review.googlesource.com/c/go/+/208639
Run-TryBot: Jason A. Donenfeld <Jason@zx2c4.com>
Reviewed-by: Bryan C. Mills <bcmills@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>

src/cmd/go/testdata/script/mod_cache_rw.txt

index b4a3a456e8d6e30ab82b73ba0688460e315e1070..a5410764bc00f86469f13173f0bf465d87be9cd4 100644 (file)
@@ -19,8 +19,8 @@ cp $WORK/extraneous.txt $GOPATH/pkg/mod/rsc.io/quote@v1.5.2/extraneous_file.go
 # should be able to remove the module cache if the '-rf' flags are set.
 [!windows] [exec:rm] exec rm -rf $GOPATH/pkg/mod
 [!windows] [!exec:rm] go clean -modcache
-[windows] [exec:rmdir] exec rmdir /s /q $GOPATH\pkg\mod
-[windows] [!exec:rmdir] go clean -modcache
+[windows] [exec:cmd.exe] exec cmd.exe /c rmdir /s /q $GOPATH\pkg\mod
+[windows] [!exec:cmd.exe] go clean -modcache
 ! exists $GOPATH/pkg/mod
 
 # The directories in the module cache should by default be unwritable,