Skip to content

Commit

Permalink
Don't download get-pants.sh into repo root. (#18)
Browse files Browse the repository at this point in the history
Downloading into the repo root will cause subsequent `pants tailor --check`
calls to fail (unless there happens to be a `shell_sources` target in the build root).
Download into `/tmp` instead.
  • Loading branch information
danxmoran authored Mar 1, 2023
1 parent f9b3aca commit 402e2fb
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions init-pants/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -66,12 +66,14 @@ runs:
shell: bash
run: |
if ! command -v pants; then
if [[ ! -f ./get-pants.sh ]]; then
curl --proto '=https' --tlsv1.2 -fsSLO \
if [[ -f ./get-pants.sh ]]; then
./get-pants.sh
else
curl --proto '=https' --tlsv1.2 -fsSLo /tmp/get-pants.sh \
https://raw.githubusercontent.com/pantsbuild/setup/${{ inputs.setup-commit }}/get-pants.sh
chmod +x ./get-pants.sh
chmod +x /tmp/get-pants.sh
/tmp/get-pants.sh
fi
./get-pants.sh
echo "$HOME/bin" >> $GITHUB_PATH
fi
Expand Down

0 comments on commit 402e2fb

Please sign in to comment.