Skip to content

Commit 0f5af05

Browse files
authored
Merge pull request #879 from Inkeliz/master
Detect unsupported GOOS
2 parents 103facb + 5103006 commit 0f5af05

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

tool.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,11 @@ func init() {
6161
fmt.Fprintf(os.Stderr, "$GOPATH not set. For more details see: go help gopath\n")
6262
os.Exit(1)
6363
}
64+
65+
if build.Default.GOOS != "linux" && build.Default.GOOS != "darwin" {
66+
fmt.Fprintf(os.Stderr, "GOOS is not supported, the supported GOOS values are linux and darwin. The GopherJS is falling back to GOOS=linux\n")
67+
build.Default.GOOS = "linux"
68+
}
6469
}
6570

6671
func main() {

0 commit comments

Comments
 (0)