Skip to content

Commit 67bef0c

Browse files
authored
fix: Ensure $(go env GOPATH)/bin exists (#6314)
1 parent 4edac9c commit 67bef0c

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

boilerplate/flyte/golang_test_targets/download_tooling.sh

+8-6
Original file line numberDiff line numberDiff line change
@@ -24,17 +24,19 @@ tools=(
2424
)
2525

2626
# This ensures pflags are up to date.
27-
make -C $REPO_ROOT/flytestdlib compile
28-
cp $REPO_ROOT/flytestdlib/bin/pflags $(go env GOPATH)/bin
27+
make -C "${REPO_ROOT}/flytestdlib" compile
28+
GO_BIN="$(go env GOPATH)/bin"
29+
mkdir -p "${GO_BIN}"
30+
cp "${REPO_ROOT}/flytestdlib/bin/pflags" "${GO_BIN}"
2931

30-
tmp_dir=$(mktemp -d -t gotooling-XXX)
32+
tmp_dir="$(mktemp -d -t gotooling-XXX)"
3133
echo "Using temp directory ${tmp_dir}"
32-
cp -R ../boilerplate/flyte/golang_support_tools/* $tmp_dir
33-
pushd "$tmp_dir"
34+
cp -R ../boilerplate/flyte/golang_support_tools/* "${tmp_dir}"
35+
pushd "${tmp_dir}"
3436

3537
for tool in "${tools[@]}"; do
3638
echo "Installing ${tool}"
37-
GO111MODULE=on go install $tool
39+
GO111MODULE=on go install "${tool}"
3840
done
3941

4042
popd

0 commit comments

Comments
 (0)