From ba72ff0eddb1547c211b18696dcb005d7b3156a6 Mon Sep 17 00:00:00 2001 From: Adeel Date: Sun, 26 Feb 2017 01:10:10 +0200 Subject: [PATCH] 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. --- scripts/obtain/dotnet-install.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/obtain/dotnet-install.sh b/scripts/obtain/dotnet-install.sh index 89ad61b66..62edadd5d 100755 --- a/scripts/obtain/dotnet-install.sh +++ b/scripts/obtain/dotnet-install.sh @@ -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 $? }