mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-23 23:34:48 +00:00
Unset GIT_DIR in pre-commit hook
Works around https://github.com/rust-lang/rust/issues/77620
This commit is contained in:
parent
4437b4b150
commit
f4989494bf
@ -7,15 +7,17 @@
|
||||
|
||||
set -Eeuo pipefail
|
||||
|
||||
ROOT_DIR="$(git rev-parse --show-toplevel)";
|
||||
COMMAND="$ROOT_DIR/x.py test tidy --bless";
|
||||
# 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 --bless"
|
||||
|
||||
if [[ "$OSTYPE" == "msys" || "$OSTYPE" == "win32" ]]; then
|
||||
COMMAND="python $COMMAND"
|
||||
fi
|
||||
|
||||
echo "Running pre-commit script '$COMMAND'";
|
||||
echo "Running pre-commit script '$COMMAND'"
|
||||
|
||||
cd "$ROOT_DIR"
|
||||
|
||||
$COMMAND;
|
||||
$COMMAND
|
||||
|
Loading…
Reference in New Issue
Block a user