]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/go/internal/script: Fix build tags of isETXTBSY
authorHiroaki Nakamura <hnakamur@gmail.com>
Wed, 15 May 2024 08:57:05 +0000 (17:57 +0900)
committerGopher Robot <gobot@golang.org>
Thu, 16 May 2024 00:12:01 +0000 (00:12 +0000)
syscall.ETXTBSY is only meaningful on Unix platforms, not on Windows.

Fixes #67356

Change-Id: I1b13292d821d61d820b396e08be9a4dd1683e843
Reviewed-on: https://go-review.googlesource.com/c/go/+/585695
Reviewed-by: Ian Lance Taylor <iant@google.com>
Auto-Submit: Ian Lance Taylor <iant@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Michael Matloob <matloob@golang.org>
src/cmd/go/internal/script/cmds_nonunix.go [moved from src/cmd/go/internal/script/cmds_other.go with 75% similarity]
src/cmd/go/internal/script/cmds_unix.go [moved from src/cmd/go/internal/script/cmds_posix.go with 91% similarity]

similarity index 75%
rename from src/cmd/go/internal/script/cmds_other.go
rename to src/cmd/go/internal/script/cmds_nonunix.go
index 847b225ae64989e3f61df72131ad2ef0c762f316..07bf284fa95eed43bfcfde9939cf4e783e1416fb 100644 (file)
@@ -2,10 +2,11 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-//go:build !(unix || windows)
+//go:build !unix
 
 package script
 
 func isETXTBSY(err error) bool {
+       // syscall.ETXTBSY is only meaningful on Unix platforms.
        return false
 }
similarity index 91%
rename from src/cmd/go/internal/script/cmds_posix.go
rename to src/cmd/go/internal/script/cmds_unix.go
index 2525f6e7529d8c9dd47602ac8008b221e022a95e..94a16b5e9a12b12f90f0565c8ce9839dc5e605e3 100644 (file)
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-//go:build unix || windows
+//go:build unix
 
 package script