Skip to content

Commit

Permalink
Use command -v rather than which
Browse files Browse the repository at this point in the history
  • Loading branch information
printfn committed Mar 11, 2024
1 parent 86d7a99 commit afdadcc
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions contrib/deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,9 @@ npm whoami

PATH="$HOME/.cargo/bin:$PATH"
echo "Ensure that we are using Rustup"
if [[ ! "$(which rustc)" =~ .cargo/bin/rustc$ ]]; then
fail "Using $(which rustc) which does not seem to be from Rustup"
rustc_cmd=$(command -v rustc)
if [[ ! "$rustc_cmd" =~ .cargo/bin/rustc$ ]]; then
fail "Using $rustc_cmd which does not seem to be from Rustup"
fi

echo "Making sure the git repository is clean..."
Expand Down

0 comments on commit afdadcc

Please sign in to comment.