diff options
| author | kennytm <kennytm@gmail.com> | 2018-10-01 16:13:05 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-10-01 16:13:05 +0800 |
| commit | 3401db0021358f4b8a26439147791646b2075c48 (patch) | |
| tree | 9cedff9612a0b56e63b7f579ff94e4ece704c97b | |
| parent | 7014afcfa1d46c6a888f4d09591650c4af7986fd (diff) | |
| parent | f9375674dfcdcbab13eb3329c6986302964ad31a (diff) | |
| download | rust-3401db0021358f4b8a26439147791646b2075c48.tar.gz rust-3401db0021358f4b8a26439147791646b2075c48.zip | |
Rollup merge of #54708 - collin5:b49475, r=Mark-Simulacrum
Make ./x.py help <cmd> invoke ./x.py <cmd> -h on its own Fixes #49475 r? @Mark-Simulacrum
| -rw-r--r-- | src/bootstrap/bootstrap.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/bootstrap/bootstrap.py b/src/bootstrap/bootstrap.py index d9c66ce2d77..c27f4f056d7 100644 --- a/src/bootstrap/bootstrap.py +++ b/src/bootstrap/bootstrap.py @@ -844,6 +844,11 @@ def bootstrap(help_triggered): def main(): """Entry point for the bootstrap process""" start_time = time() + + # x.py help <cmd> ... + if len(sys.argv) > 1 and sys.argv[1] == 'help': + sys.argv = sys.argv[:1] + [sys.argv[2], '-h'] + sys.argv[3:] + help_triggered = ( '-h' in sys.argv) or ('--help' in sys.argv) or (len(sys.argv) == 1) try: |
