Skip to content

Commit

Permalink
More robust argument parsing in sync-dist.py
Browse files Browse the repository at this point in the history
  • Loading branch information
SimonSapin committed Dec 19, 2017
1 parent cb2d148 commit 59491ad
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions ci/sync-dist.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,13 +60,16 @@ def usage():
"update-prod-release"]:
usage()

if "--live-run" in sys.argv:
live_run = True
sys.argv.remove("--live-run")

if "archives" in command or "release" in command:
if len(sys.argv) < 3:
if len(sys.argv) != 3:
usage()
archive_version = sys.argv[2]

if "--live-run" in sys.argv:
live_run = True
elif len(sys.argv) != 2:
usage()

dev_s3_bucket = "dev-static-rust-lang-org"
prod_s3_bucket = "static-rust-lang-org"
Expand Down

0 comments on commit 59491ad

Please sign in to comment.