Skip to content

Commit 17aa5b5

Browse files
authored
Merge pull request #1315 from SimonSapin/args
More robust argument parsing in sync-dist.py
2 parents cb2d148 + 59491ad commit 17aa5b5

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

ci/sync-dist.py

+7-4
Original file line numberDiff line numberDiff line change
@@ -60,13 +60,16 @@ def usage():
6060
"update-prod-release"]:
6161
usage()
6262

63+
if "--live-run" in sys.argv:
64+
live_run = True
65+
sys.argv.remove("--live-run")
66+
6367
if "archives" in command or "release" in command:
64-
if len(sys.argv) < 3:
68+
if len(sys.argv) != 3:
6569
usage()
6670
archive_version = sys.argv[2]
67-
68-
if "--live-run" in sys.argv:
69-
live_run = True
71+
elif len(sys.argv) != 2:
72+
usage()
7073

7174
dev_s3_bucket = "dev-static-rust-lang-org"
7275
prod_s3_bucket = "static-rust-lang-org"

0 commit comments

Comments
 (0)