Skip to content

Commit 73adaa0

Browse files
committed
consistent behavior between macOS and Linux
1 parent 77e1d3a commit 73adaa0

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

run-test.sh

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,8 @@ if ! test -f "$RUST_SRC/Cargo.lock"; then
2626
echo "Set RUST_SRC to the Rust source directory, or install the rust-src component."
2727
exit 1
2828
fi
29-
if readlink -e . &>/dev/null; then
30-
RUST_SRC=$(readlink -e "$RUST_SRC")
31-
fi
29+
# macOS does not have a useful readlink/realpath so we have to use Python instead...
30+
RUST_SRC=$(python -c 'import os, sys; print(os.path.realpath(sys.argv[1]))' "$RUST_SRC")
3231

3332
# update symlink
3433
rm -f lib$CRATE

0 commit comments

Comments
 (0)