]> git.lizzy.rs Git - rust.git/commitdiff
stop relying on python being in the PATH
authorRalf Jung <post@ralfj.de>
Tue, 10 May 2022 10:14:47 +0000 (12:14 +0200)
committerRalf Jung <post@ralfj.de>
Tue, 10 May 2022 10:20:55 +0000 (12:20 +0200)
miri

diff --git a/miri b/miri
index 0ba7e536abe50070798844f025331e8afc6aa173..56ae119cd1bccb8333ad2ce61101fd3ed3c005f4 100755 (executable)
--- a/miri
+++ b/miri
@@ -40,7 +40,7 @@ TARGET=$(rustc --version --verbose | grep "^host:" | cut -d ' ' -f 2)
 SYSROOT=$(rustc --print sysroot)
 LIBDIR=$SYSROOT/lib/rustlib/$TARGET/lib
 # 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")")
+MIRIDIR=$(dirname "$(python3 -c 'import os, sys; print(os.path.realpath(sys.argv[1]))' "$0")")
 if ! test -d "$LIBDIR"; then
     echo "Something went wrong determining the library dir."
     echo "I got $LIBDIR but that does not exist."