Skip to content

Commit 5d71528

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

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

cargo-miri/miri

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

miri

Lines changed: 3 additions & 2 deletions
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)