scripts: Fix update_chroot toolchain_boards arg parse
Without this, args would be pass in as a string and later split into
alphabets and cause it to fail. (--toolchain_boards b,r,y,a)
Add nargs to the argparser to fix that.
BEFORE
$ bin/cros_sdk --no-ns-pid -- update_chroot --toolchain-board brya
...
/mnt/host/source/src/scripts/update_chroot.sh
--script-is-run-only-by-chromite-and-not-users --usepkg
--toolchain_boards b,r,y,a
AFTER
$ bin/cros_sdk --no-ns-pid -- update_chroot --toolchain-board brya
...
/mnt/host/source/src/scripts/update_chroot.sh
--script-is-run-only-by-chromite-and-not-users --usepkg
--toolchain_boards brya
BUG=None
TEST=Run it and check the argument
Change-Id: I0dbde78d29bce2cec29d5cf28fb3e6cfb8350cb7
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/chromite/+/4857289
Reviewed-by: Mike Frysinger <vapier@chromium.org>
Auto-Submit: Po-Hsien Wang <pwang@chromium.org>
Commit-Queue: Po-Hsien Wang <pwang@chromium.org>
Tested-by: Po-Hsien Wang <pwang@chromium.org>
diff --git a/scripts/update_chroot.py b/scripts/update_chroot.py
index bb27667..05fd4ff 100644
--- a/scripts/update_chroot.py
+++ b/scripts/update_chroot.py
@@ -77,7 +77,7 @@
)
group.add_argument(
"--toolchain-boards",
- default="",
+ nargs="+",
help="Extra toolchains to setup for the specified boards.",
)
group.add_argument(