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>
changes/15/5583415/2
Fumitoshi Ukai 12 months ago committed by LUCI CQ
parent e99a4f1cf1
commit da5e2f948a

@ -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.

Loading…
Cancel
Save