about summary refs log tree commit diff
diff options
context:
space:
mode:
authorCollins Abitekaniza <abtcolns@gmail.com>2018-10-01 04:06:58 +0300
committerCollins Abitekaniza <abtcolns@gmail.com>2018-10-01 04:06:58 +0300
commitf9375674dfcdcbab13eb3329c6986302964ad31a (patch)
tree0233027a58a84786f773cb7d8231fcadfc65053d
parent3bc2ca7e4f8507f82a4c357ee19300166bcd8099 (diff)
downloadrust-f9375674dfcdcbab13eb3329c6986302964ad31a.tar.gz
rust-f9375674dfcdcbab13eb3329c6986302964ad31a.zip
allow use of ./x.py help <cmd> ...
-rw-r--r--src/bootstrap/bootstrap.py5
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: