Skip to content

Commit

Permalink
csbuild: use command -v instead of which
Browse files Browse the repository at this point in the history
The external `which` command might not be available on lightweight
installations of Linux distributions.

Suggested-by: Andreas Schneider
Fixes #20
Closes #21
  • Loading branch information
kdudka committed Oct 23, 2018
1 parent 7ddacd1 commit a47e16e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scripts/run-scan.sh
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ if test -r CMakeCache.txt; then
2>/dev/null | cut -c4-)"
test -n "$abs_path" || continue
rel_path="$(basename "$abs_path")"
exp_path="$(which "$rel_path")"
exp_path="$(command -v "$rel_path")"
if test "$abs_path" != "$exp_path"; then
die "$(realpath CMakeCache.txt) contains \
'CMAKE_${i}_COMPILER=${abs_path}' instead of \
Expand Down

0 comments on commit a47e16e

Please sign in to comment.