Skip to content

Commit 3401db0

Browse files
authored
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
2 parents 7014afc + f937567 commit 3401db0

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/bootstrap/bootstrap.py

+5
Original file line numberDiff line numberDiff line change
@@ -844,6 +844,11 @@ def bootstrap(help_triggered):
844844
def main():
845845
"""Entry point for the bootstrap process"""
846846
start_time = time()
847+
848+
# x.py help <cmd> ...
849+
if len(sys.argv) > 1 and sys.argv[1] == 'help':
850+
sys.argv = sys.argv[:1] + [sys.argv[2], '-h'] + sys.argv[3:]
851+
847852
help_triggered = (
848853
'-h' in sys.argv) or ('--help' in sys.argv) or (len(sys.argv) == 1)
849854
try:

0 commit comments

Comments
 (0)