about summary refs log tree commit diff
diff options
context:
space:
mode:
authoryukang <moorekang@gmail.com>2023-06-30 15:37:10 +0800
committeryukang <moorekang@gmail.com>2023-06-30 15:37:10 +0800
commitcfa1a79009503d7ba12f39522c4d622e4ea239c8 (patch)
treeb6c3c4f28d4f1a84dc5da79f7c0f42119cfa19ee
parent97279e91d8d3973da9c1fc606a2b773213ed54e5 (diff)
downloadrust-cfa1a79009503d7ba12f39522c4d622e4ea239c8.tar.gz
rust-cfa1a79009503d7ba12f39522c4d622e4ea239c8.zip
User may want to skip tidy check sometimes
-rwxr-xr-xsrc/etc/pre-push.sh6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/etc/pre-push.sh b/src/etc/pre-push.sh
index 0807e0492c1..c9e1a2733fd 100755
--- a/src/etc/pre-push.sh
+++ b/src/etc/pre-push.sh
@@ -5,7 +5,7 @@
 # and remove it from .git/hooks to deactivate.
 #
 
-set -Eeuo pipefail
+set -Euo pipefail
 
 # https://github.com/rust-lang/rust/issues/77620#issuecomment-705144570
 unset GIT_DIR
@@ -15,3 +15,7 @@ echo "Running pre-push script $ROOT_DIR/x test tidy"
 
 cd "$ROOT_DIR"
 ./x test tidy --set build.locked-deps=true
+if [ $? -ne 0 ]; then
+    echo "You may use \`git push --no-verify\` to skip this check."
+    exit 1
+fi