Skip to content

Commit

Permalink
Rollup merge of rust-lang#54708 - collin5:b49475, r=Mark-Simulacrum
Browse files Browse the repository at this point in the history
Make ./x.py help <cmd> invoke ./x.py <cmd> -h on its own

Fixes rust-lang#49475

r? @Mark-Simulacrum
  • Loading branch information
kennytm authored Oct 1, 2018
2 parents 7014afc + f937567 commit 3401db0
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/bootstrap/bootstrap.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 3401db0

Please sign in to comment.