Skip to content

Commit

Permalink
Use Unix Shell build-in 'hash' over 'which'
Browse files Browse the repository at this point in the history
`which` is an external utility. `hash` or `command -v` are built-in
General Commands.

See http://stackoverflow.com/a/677212/863980

Related: dotnet/coreclr#8823 & dotnet/corert#2831

I chose `hash` here as `run-build.sh` is already using it.
  • Loading branch information
am11 committed Feb 25, 2017
1 parent 22fcc35 commit 9b2237e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions scripts/obtain/dotnet-install.sh
Expand Up @@ -122,8 +122,8 @@ get_current_os_name() {

machine_has() {
eval $invocation
which "$1" > /dev/null 2>&1

hash "$1" > /dev/null 2>&1
return $?
}

Expand Down

0 comments on commit 9b2237e

Please sign in to comment.