Skip to content

Commit

Permalink
Use command instead of which to check for curl etc.
Browse files Browse the repository at this point in the history
  • Loading branch information
gwynne committed Sep 23, 2023
1 parent 4de4908 commit 93a0db2
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,11 @@ runs:
name: Make sure Swiftly's deps are available
shell: bash
run: |
which curl >/dev/null 2>&1 || {
if [[ -n "$(which apt-get)" ]]; then
command -v curl >/dev/null || {
if command -v apt-get >/dev/null; then
apt-get update -q
apt-get install -qy curl
elif [[ -n "$(which yum)" ]]; then
elif command -v yum >/dev/null; then
yum install -y curl
else
echo "curl is not installed and we couldn't figure out how to install it."
Expand Down

0 comments on commit 93a0db2

Please sign in to comment.