Skip to content

Commit

Permalink
fix: restore PATH variable at end of execution
Browse files Browse the repository at this point in the history
  • Loading branch information
aranjans committed May 9, 2024
1 parent eb40292 commit 8493f9f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion scripts/regenerate.sh
Expand Up @@ -21,11 +21,12 @@ function finish {
rm -rf "$WORKDIR"
# Revert back the PATH to client's original value
export PATH=$RESTORED_PATH
echo "Restored PATH to older value: $PATH"
}
trap finish EXIT

GOBIN="${WORKDIR}"/bin
RESTORED_PATH=PATH
RESTORED_PATH=$PATH
export PATH="${GOBIN}:${PATH}"
mkdir -p "${GOBIN}"

Expand Down

0 comments on commit 8493f9f

Please sign in to comment.