about summary refs log tree commit diff
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2023-06-01 22:47:31 +0200
committerGitHub <noreply@github.com>2023-06-01 22:47:31 +0200
commit8f0e1442b0edec731ad8c2ba381a313270cbfcb4 (patch)
tree99f12b26e21b672135899744e7daa2e3c7fb0d97
parent955bba36ea964e0f5a115217f9c224fd61a9fa5d (diff)
parentf692cf6fd16568bf05054d5f67bd87bf075eee51 (diff)
Rollup merge of #112146 - jyn514:locked-deps, r=clubby789
Fix `src/etc/pre-push.sh` when `build.locked-deps` is already set

Before, cargo would error:
```
; git push
Running pre-push script /home/jyn/src/rust/x test tidy
Building bootstrap
    Finished dev [unoptimized] target(s) in 0.02s
Build stage0 tool tidy (x86_64-unknown-linux-gnu)
error: the argument '--locked' cannot be used multiple times

Usage: cargo build [OPTIONS]

For more information, try '--help'.
Build completed unsuccessfully in 0:00:00
error: failed to push some refs to 'github.com:jyn514/rust.git'
```
-rwxr-xr-xsrc/etc/pre-push.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/etc/pre-push.sh b/src/etc/pre-push.sh
index ff17931115c..0807e0492c1 100755
--- a/src/etc/pre-push.sh
+++ b/src/etc/pre-push.sh
@@ -14,4 +14,4 @@ ROOT_DIR="$(git rev-parse --show-toplevel)"
 echo "Running pre-push script $ROOT_DIR/x test tidy"
 
 cd "$ROOT_DIR"
-CARGOFLAGS="--locked" ./x test tidy
+./x test tidy --set build.locked-deps=true