Browse Source

autoninja: fix for no args

need to split input_args[1] even if it doesn't contains " ",
e.g. when input_args[1] == ""

Bug: b/343172216
Change-Id: I32d9346063534ea2b4f891fd596c7ec02ab10dbf
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5583415
Auto-Submit: Fumitoshi Ukai <ukai@google.com>
Commit-Queue: Richard Wang <richardwa@google.com>
Reviewed-by: Richard Wang <richardwa@google.com>
Fumitoshi Ukai 1 year ago
parent
commit
da5e2f948a
1 changed files with 1 additions and 2 deletions
  1. 1 2
      autoninja.py

+ 1 - 2
autoninja.py

@@ -221,8 +221,7 @@ def main(args):
     # separated by spaces. When this case is detected we need to do argument
     # splitting ourselves. This means that arguments containing actual spaces
     # are not supported by autoninja, but that is not a real limitation.
-    if (sys.platform.startswith("win") and len(args) == 2
-            and input_args[1].count(" ") > 0):
+    if sys.platform.startswith("win") and len(args) == 2:
         input_args = args[:1] + args[1].split()
 
     # Ninja uses getopt_long, which allow to intermix non-option arguments.