Add error message for readlink -f failure (#23102)

* Add error message for readlink -f failure
This commit is contained in:
Will Hickey 2022-02-14 13:16:13 -06:00 committed by GitHub
parent d15d495f17
commit 89f5145f64
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 0 deletions

View File

@ -3,6 +3,13 @@
here="$(dirname "$0")"
cargo="$(readlink -f "${here}/../cargo")"
if [[ -z $cargo ]]; then
>&2 echo "Failed to find cargo. Mac readlink doesn't support -f. Consider switching
to gnu readlink with 'brew install coreutils' and then symlink greadlink as
/usr/local/bin/readlink."
exit 1
fi
set -e
shifted_args=()