Skip to content

Commit

Permalink
Use command -v instead of which
Browse files Browse the repository at this point in the history
Because `which` may not be available.
  • Loading branch information
abitrolly authored and mxcl committed Jan 14, 2025
1 parent 0514229 commit bb5bfac
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion installer.sh
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ _install_pkgx() {

rm -r "$tmpdir"

if [ "$(command which pkgx)" != /usr/local/bin/pkgx ]; then
if [ "$(command -v pkgx)" != /usr/local/bin/pkgx ]; then
echo "warning: active pkgx is not /usr/local/bin/pkgx" >&2
export PATH="/usr/local/bin:$PATH" # so we can exec if required
fi
Expand Down

0 comments on commit bb5bfac

Please sign in to comment.