summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMazdak Farrokhzad <twingoow@gmail.com>2019-02-27 13:32:23 +0100
committerGitHub <noreply@github.com>2019-02-27 13:32:23 +0100
commitfed561002582760636314f00498783e01061285b (patch)
treec6ea9204c24e44ef52d29c1e316116805115ce03
parentf84a8cf28a5e914ae13f4d8d9c15468268e415d4 (diff)
parent890ef48eb93c42e8a6c5535a6aefa02291b93b2d (diff)
downloadrust-fed561002582760636314f00498783e01061285b.tar.gz
Rollup merge of #58680 - varkor:xpy-help-index-error, r=alexcrichton
Fix an indexing error when using `x.py help` Fixes https://github.com/rust-lang/rust/issues/58640.
-rw-r--r--src/bootstrap/bootstrap.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/bootstrap/bootstrap.py b/src/bootstrap/bootstrap.py
index 119b38bcc99..c98d8b8ecf4 100644
--- a/src/bootstrap/bootstrap.py
+++ b/src/bootstrap/bootstrap.py
@@ -830,7 +830,7 @@ def main():
# 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:]
+ sys.argv = [sys.argv[0], '-h'] + sys.argv[2:]
help_triggered = (
'-h' in sys.argv) or ('--help' in sys.argv) or (len(sys.argv) == 1)