Add check for existence of 'which' command before proceeding with the script
This commit is contained in:
parent
51a12d1de8
commit
83d495df2e
5
sake
5
sake
|
@ -9,6 +9,11 @@ Executes a SilverStripe command"
|
|||
exit 1
|
||||
fi
|
||||
|
||||
if ! [ -x "$(command -v which)" ]; then
|
||||
echo "Error: sake requires the 'which' command to operate." >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# find the silverstripe installation, looking first at sake
|
||||
# bin location, but falling back to current directory
|
||||
sakedir=`dirname $0`
|
||||
|
|
Loading…
Reference in New Issue