Prefer Unix Shell build-in 'hash' over 'which'
`which` is an external utility. `hash` or `command -v` are built-in General Commands. See http://stackoverflow.com/a/677212/863980 I chose `hash` here as `run-build.sh` is already using it.
This commit is contained in:
parent
22fcc35797
commit
ba72ff0edd
1 changed files with 2 additions and 2 deletions
4
scripts/obtain/dotnet-install.sh
vendored
4
scripts/obtain/dotnet-install.sh
vendored
|
@ -122,8 +122,8 @@ get_current_os_name() {
|
||||||
|
|
||||||
machine_has() {
|
machine_has() {
|
||||||
eval $invocation
|
eval $invocation
|
||||||
|
|
||||||
which "$1" > /dev/null 2>&1
|
hash "$1" > /dev/null 2>&1
|
||||||
return $?
|
return $?
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue