bin: dist_get script: prevents get_go_vars() returns same values twice
License: MIT Signed-off-by: Ariel Machado <sparciie@yahoo.com>
Jakub Sztandera committed
Aug 12, 2016 at 21:03 UTC
e26ce572a00fd6796466640235ee81ca0702b869
1 file changed
+1
-3
bin/dist_get
+1
-3
@@ -75,9 +75,7 @@ unarchive() {
75
get_go_vars() {
76
if [ ! -z "$GOOS" ] && [ ! -z "$GOARCH" ]; then
77
printf "%s-%s" "$GOOS" "$GOARCH"
78
- fi
79
-
80
- if have_binary go; then
78
+ elif have_binary go; then
79
printf "%s-%s" "$(go env GOOS)" "$(go env GOARCH)"
80
else
81
die "no way of determining system GOOS and GOARCH\nPlease manually set GOOS and GOARCH then retry."