From 8086e5b7a69ae84216ed67d6c87d0cadc453b0bf Mon Sep 17 00:00:00 2001 From: Harshal Patil Date: Mon, 15 Jan 2018 10:39:17 +0530 Subject: [PATCH] scripts: Exit if GOPATH is not set Changed the `rootfs.sh` script to exit with an error if `GOPATH` isn't set in the environment. Fixes #20. Signed-off-by: Harshal Patil --- rootfs-builder/rootfs.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/rootfs-builder/rootfs.sh b/rootfs-builder/rootfs.sh index 9cd147f6d8..858b441ad9 100755 --- a/rootfs-builder/rootfs.sh +++ b/rootfs-builder/rootfs.sh @@ -91,6 +91,8 @@ done shift $(($OPTIND - 1)) +[ -z "$GOPATH" ] && die "GOPATH not set" + distro="$1" [ -n "${distro}" ] || usage 1