about summary refs log tree commit diff
path: root/src/etc
diff options
context:
space:
mode:
authorJoshua Nelson <github@jyn.dev>2022-12-17 17:18:13 -0600
committerJoshua Nelson <github@jyn.dev>2022-12-17 17:18:53 -0600
commitc754d057a67bb8779789ad48708632fcf87361b1 (patch)
tree858260eaf6ea365ff49e548c22ca5922cc8e86dc /src/etc
parent2d76a9df5d040e8dfcb23e01fc3847c628d833e4 (diff)
downloadrust-c754d057a67bb8779789ad48708632fcf87361b1.tar.gz
rust-c754d057a67bb8779789ad48708632fcf87361b1.zip
Make the pre-push script work on directories with spaces
As a secondary benefit, it's also a lot simpler.
Diffstat (limited to 'src/etc')
-rwxr-xr-xsrc/etc/pre-push.sh12
1 files changed, 2 insertions, 10 deletions
diff --git a/src/etc/pre-push.sh b/src/etc/pre-push.sh
index be7de3ebaf5..2a3086338b4 100755
--- a/src/etc/pre-push.sh
+++ b/src/etc/pre-push.sh
@@ -10,16 +10,8 @@ set -Eeuo pipefail
 # https://github.com/rust-lang/rust/issues/77620#issuecomment-705144570
 unset GIT_DIR
 ROOT_DIR="$(git rev-parse --show-toplevel)"
-COMMAND="$ROOT_DIR/x.py test tidy"
 
-if [[ "$OSTYPE" == "msys" || "$OSTYPE" == "win32" ]]; then
-  COMMAND="python $COMMAND"
-elif ! command -v python &> /dev/null; then
-  COMMAND="python3 $COMMAND"
-fi
-
-echo "Running pre-push script '$COMMAND'"
+echo "Running pre-push script $ROOT_DIR/x test tidy"
 
 cd "$ROOT_DIR"
-
-$COMMAND
+./x test tidy