]> git.ipfire.org Git - thirdparty/gettext.git/commitdiff
tests: Fix a lang-go failure.
authorBruno Haible <bruno@clisp.org>
Tue, 5 Aug 2025 06:35:42 +0000 (08:35 +0200)
committerBruno Haible <bruno@clisp.org>
Tue, 5 Aug 2025 06:43:59 +0000 (08:43 +0200)
* gettext-tools/tests/lang-go: Add workaround against
"go: GOPROXY list is not the empty string, but contains no entries" error.

gettext-tools/tests/lang-go

index bfb681290e8812b78368a491ff85196f371d5d8f..27d4648a4adf5b5bbbb7247a538f257cfbea6d50 100644 (file)
@@ -57,7 +57,16 @@ func main () {
 }
 EOF
 
-${GO} mod download github.com/leonelquinteros/gotext
+${GO} mod download github.com/leonelquinteros/gotext || {
+  # Attempt to fix an error
+  # "go: GOPROXY list is not the empty string, but contains no entries"
+  # The precise cause of this error is not known, but it appears to be a
+  # version mismatch. (Between what? The 'go' command? A nonexistent go.env
+  # file? The $HOME/go/ cache?) The workaround is from
+  # <https://github.com/golang/go/issues/61928#issuecomment-2053877087>.
+  unset GOROOT
+  ${GO} mod download github.com/leonelquinteros/gotext
+}
 
 : ${GOCOMP="/bin/sh ../../gocomp.sh"}
 ${GOCOMP} program.go 2>prog.err \