Cirrus: Fix error when GOPATH is unset

pull/148/head
Jeremy Rand 3 years ago
parent 3db1ee0c33
commit bb369d083c
No known key found for this signature in database
GPG Key ID: FD7550C2EB800711

@ -4,10 +4,8 @@ set -euxo pipefail
shopt -s nullglob globstar shopt -s nullglob globstar
# set GOPATH if empty (travis sets it, but useful for humans) # set GOPATH if empty (travis sets it, but useful for humans)
if [ -z "$GOPATH" ]; then GOPATH="$(go env GOPATH)"
GOPATH=$(go env GOPATH)
export GOPATH export GOPATH
fi
mkdir -p "$GOPATH"/src/github.com/"$CIRRUS_REPO_OWNER" mkdir -p "$GOPATH"/src/github.com/"$CIRRUS_REPO_OWNER"
cp -av "$PWD" "$GOPATH"/src/github.com/"$CIRRUS_REPO_FULL_NAME" cp -av "$PWD" "$GOPATH"/src/github.com/"$CIRRUS_REPO_FULL_NAME"

Loading…
Cancel
Save