Skip to content

Commit 85d39ba

Browse files
authored
Rollup merge of #105853 - jyn514:prepush-windows, r=Mark-Simulacrum
Make the pre-push script work on directories with spaces As a secondary benefit, it's also a lot simpler. cc `@caass` - would love to have a review if you have time :)
2 parents fd5af8c + c754d05 commit 85d39ba

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)