Skip to content

Commit 0949cd3

Browse files
committed
Auto merge of #1924 - RalfJung:ra, r=oli-obk
hack to work around RA quirk This is a gross hack to work around rust-lang/rust-analyzer#10793: calling `cargo-miri/miri` does the same thing as calling `./miri`. `@oli-obk` this is the best I could come up with... not sure if we want to have this in the repo. I am also okay with carrying `cargo-miri/miri` locally.
2 parents 73cf2ba + 5d71528 commit 0949cd3

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

cargo-miri/miri

+3
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

+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)