Skip to content

Commit c754d05

Browse files
committed
Make the pre-push script work on directories with spaces
As a secondary benefit, it's also a lot simpler.
1 parent 2d76a9d commit c754d05

File tree

1 file changed

+2
-10
lines changed

1 file changed

+2
-10
lines changed

src/etc/pre-push.sh

+2-10
Original file line numberDiff line numberDiff line change
@@ -10,16 +10,8 @@ set -Eeuo pipefail
1010
# https://github.com/rust-lang/rust/issues/77620#issuecomment-705144570
1111
unset GIT_DIR
1212
ROOT_DIR="$(git rev-parse --show-toplevel)"
13-
COMMAND="$ROOT_DIR/x.py test tidy"
1413

15-
if [[ "$OSTYPE" == "msys" || "$OSTYPE" == "win32" ]]; then
16-
COMMAND="python $COMMAND"
17-
elif ! command -v python &> /dev/null; then
18-
COMMAND="python3 $COMMAND"
19-
fi
20-
21-
echo "Running pre-push script '$COMMAND'"
14+
echo "Running pre-push script $ROOT_DIR/x test tidy"
2215

2316
cd "$ROOT_DIR"
24-
25-
$COMMAND
17+
./x test tidy

0 commit comments

Comments
 (0)