]> git.ipfire.org Git - thirdparty/mkosi.git/commitdiff
config: match against verb value not verb name
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Sat, 31 Aug 2024 07:25:01 +0000 (10:25 +0300)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Sat, 31 Aug 2024 07:38:49 +0000 (10:38 +0300)
For the existing verbs, those are the same. But for a verb with
a dash, which I want to add next, the name has the underscore,
which will not match the verb on the commandline.

mkosi/config.py

index 38769fb48c84ecd9f30d8a52947d1db6589c10af..461eaedf77ba94c960e976e82a8ef3996810fa70 100644 (file)
@@ -3766,7 +3766,7 @@ def parse_config(argv: Sequence[str] = (), *, resources: Path = Path("/")) -> tu
     # summary would be treated as -i=summary.
     for verb in Verb:
         try:
-            v_i = argv.index(verb.name)
+            v_i = argv.index(verb.value)
         except ValueError:
             continue