Skip to content

Commit a0130f3

Browse files
committed
hack to work around RA quirk
1 parent 4f0faed commit a0130f3

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

cargo-miri/miri

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#!/bin/sh
2+
# Hack to work around https://github.com/rust-analyzer/rust-analyzer/issues/10793.
3+
cd "$(dirname "$0")"/..
4+
exec ./miri "$@"
5+

miri

+3-2
Original file line numberDiff line numberDiff line change
@@ -39,10 +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=$(dirname "$0")
4342
if readlink -e . &>/dev/null; then
4443
# This platform supports `readlink -e`.
45-
MIRIDIR=$(readlink -e "$MIRIDIR")
44+
MIRIDIR=$(dirname "$(readlink -e "$0")")
45+
else
46+
MIRIDIR=$(dirname "$0")
4647
fi
4748
if ! test -d "$LIBDIR"; then
4849
echo "Something went wrong determining the library dir."

0 commit comments

Comments
 (0)