Error on missing greadlink (#25817)

This commit is contained in:
apfitzge 2022-06-08 08:34:53 -05:00 committed by GitHub
parent 79a8ecd0ac
commit d4a442cf5f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 0 deletions

View File

@ -9,7 +9,14 @@ if [[ $OSTYPE == darwin* ]]; then
# Mac OS X's version of `readlink` does not support the -f option,
# But `greadlink` does, which you can get with `brew install coreutils`
readlink_cmd="greadlink"
if ! command -v ${readlink_cmd} &> /dev/null
then
echo "${readlink_cmd} could not be found. You may need to install coreutils: \`brew install coreutils\`"
exit 1
fi
fi
cargo="$("${readlink_cmd}" -f "${here}/../cargo")"
set -e