Merge pull request #9339 from DorsetDigital/Patch-9338-sake-which

Add check for existence of 'which' command before proceeding with the…
This commit is contained in:
Steve Boyd 2020-06-30 17:32:14 +12:00 committed by GitHub
commit a0d00f8951
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

5
sake
View File

@ -9,6 +9,11 @@ Executes a SilverStripe command"
exit 1 exit 1
fi 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 # find the silverstripe installation, looking first at sake
# bin location, but falling back to current directory # bin location, but falling back to current directory
sakedir=`dirname $0` sakedir=`dirname $0`