From 9224c09098bfd420a79dca7d29963041937718bc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C3=A9ter=20Szil=C3=A1gyi?= Date: Tue, 29 Sep 2015 10:41:49 +0300 Subject: [PATCH] Display a proper error message if no GOPATH is set. --- xgo.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/xgo.go b/xgo.go index 6f0a1d1..767bd35 100644 --- a/xgo.go +++ b/xgo.go @@ -174,6 +174,9 @@ func compile(repo string, image string, remote string, branch string, pack strin repo = pack.ImportPath // Iterate over all the local libs and export the mount points + if os.Getenv("GOPATH") == "" { + log.Fatalf("No $GOPATH is set or forwarded to xgo") + } for _, gopath := range strings.Split(os.Getenv("GOPATH"), string(os.PathListSeparator)) { // Since docker sandboxes volumes, resolve any symlinks manually sources := filepath.Join(gopath, "src")