diff mbox series

[wic,9/9] cli.py: fix main() for standalone mode

Message ID 20260403183644.2783267-10-twoerner@gmail.com
State New
Headers show
Series standalone wic repository | expand

Commit Message

Trevor Woerner April 3, 2026, 6:36 p.m. UTC
The generated hatch launcher calls wic.cli.main() with no arguments, but
wic defines main(argv). Update main() handling to match.

AI-Generated: codex/gpt-5.4 (high)
Reviewed-by: Bruce Ashfield <bruce.ashfield@gmail.com>
Reviewed-by: Mark Hatle <mark.hatle@kernel.crashing.org>
Signed-off-by: Trevor Woerner <twoerner@gmail.com>
---
 src/wic/cli.py | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/src/wic/cli.py b/src/wic/cli.py
index 04b2ad25cac5..cf3e51e3afad 100755
--- a/src/wic/cli.py
+++ b/src/wic/cli.py
@@ -590,7 +590,10 @@  class WicArgumentParser(argparse.ArgumentParser):
      def format_help(self):
          return hlp.wic_help
 
-def main(argv):
+def main(argv=None):
+    if argv is None:
+        argv = sys.argv[1:]
+
     parser = WicArgumentParser(
         description="wic version %s" % __version__)