Skip to content

Commit f56cd06

Browse files
committed
fix Miri script on macOS
1 parent 531211c commit f56cd06

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

miri

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,11 @@ EOF
3939
TARGET=$(rustc --version --verbose | grep "^host:" | cut -d ' ' -f 2)
4040
SYSROOT=$(rustc --print sysroot)
4141
LIBDIR=$SYSROOT/lib/rustlib/$TARGET/lib
42-
MIRIDIR=$(readlink -e "$(dirname "$0")")
42+
MIRIDIR=$(dirname "$0")
43+
if readlink -e . >/dev/null; then
44+
# This platform supports `readlink -e`.
45+
MIRIDIR=$(readlink -e "$MIRIDIR")
46+
fi
4347
if ! test -d "$LIBDIR"; then
4448
echo "Something went wrong determining the library dir."
4549
echo "I got $LIBDIR but that does not exist."

0 commit comments

Comments
 (0)