Files
chromium_depot_tools/siso.py
Philipp Wollermann 3d559609b4 siso: Handle empty args and startup flags
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>
2025-11-16 19:37:24 -08:00

12 KiB