Skip to content

Commit

Permalink
Never fail when probing avaiable utils with which
Browse files Browse the repository at this point in the history
  • Loading branch information
nvie committed Apr 17, 2023
1 parent 2eec073 commit 7095484
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion git-relative-path
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
set -e

root="$(git root)"
realpath_bin="$(which grealpath realpath 2>/dev/null | head -n1)"
realpath_bin="$(which grealpath realpath 2>/dev/null | head -n1 || true)"

if [ ! -x "$realpath_bin" ]; then
echo "'realpath' or 'grealpath' utility not found. Please install GNU coreutils." >&2
Expand Down

0 comments on commit 7095484

Please sign in to comment.