We might run commands that potentially need some time to complete so
let's only run them when needed.
def needs_root(self) -> bool:
return self in (Verb.shell, Verb.boot, Verb.burn)
+ def needs_credentials(self) -> bool:
+ return self in (Verb.summary, Verb.qemu, Verb.boot, Verb.shell)
+
class ConfigFeature(StrEnum):
auto = enum.auto()
def load_credentials(args: argparse.Namespace) -> dict[str, str]:
+ if not args.verb.needs_credentials():
+ return {}
+
creds = {
"agetty.autologin": "root",
"login.noauth": "yes",