We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent cac6759 commit a9dd9b9Copy full SHA for a9dd9b9
miri
@@ -39,12 +39,8 @@ EOF
39
TARGET=$(rustc --version --verbose | grep "^host:" | cut -d ' ' -f 2)
40
SYSROOT=$(rustc --print sysroot)
41
LIBDIR=$SYSROOT/lib/rustlib/$TARGET/lib
42
-if readlink -e . &>/dev/null; then
43
- # This platform supports `readlink -e`.
44
- MIRIDIR=$(dirname "$(readlink -e "$0")")
45
-else
46
- MIRIDIR=$(dirname "$0")
47
-fi
+# macOS does not have a useful readlink/realpath so we have to use Python instead...
+MIRIDIR=$(dirname "$(python -c 'import os, sys; print(os.path.realpath(sys.argv[1]))' "$0")")
48
if ! test -d "$LIBDIR"; then
49
echo "Something went wrong determining the library dir."
50
echo "I got $LIBDIR but that does not exist."
0 commit comments