From 51030064b65f1ded39721377b8822963643d62ad Mon Sep 17 00:00:00 2001 From: Inkeliz Date: Fri, 9 Nov 2018 16:55:57 -0200 Subject: [PATCH] added detection of unsupported GOOS --- tool.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tool.go b/tool.go index 4c580a139..9712d29be 100644 --- a/tool.go +++ b/tool.go @@ -59,6 +59,11 @@ func init() { fmt.Fprintf(os.Stderr, "$GOPATH not set. For more details see: go help gopath\n") os.Exit(1) } + + if build.Default.GOOS != "linux" && build.Default.GOOS != "darwin" { + 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") + build.Default.GOOS = "linux" + } } func main() {