mirror of
https://chromium.googlesource.com/chromium/tools/depot_tools.git
synced 2026-01-11 18:51:29 +00:00
Using `args[1]` to get the subcommand name doesn't work when the user calls siso without any arguments, or when they specify global flags such as `siso -logtostderr ninja ...`. We can use the existing `subcmd` variable instead. This fixes the following traceback: ``` $ siso Traceback (most recent call last): File "/home/philwo/depot_tools/siso.py", line 313, in <module> sys.exit(main(sys.argv)) ^^^^^^^^^^^^^^ File "/home/philwo/depot_tools/siso.py", line 292, in main if args[1] == "ninja": ~~~~^^^ IndexError: list index out of range ``` Change-Id: Id319bdf099a2e87e049aee474734495424617a5a Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/7155649 Auto-Submit: Philipp Wollermann <philwo@google.com> Commit-Queue: Philipp Wollermann <philwo@google.com> Reviewed-by: Alex Ovsienko <ovsienko@google.com>
12 KiB
12 KiB