Avoid duplicate confirmations in a safer way

This version instead still requires --yes with --restart to avoid the
confirmation option, but avoids duplicate prompts.

This might be slightly more cumbersome, but ensures consistency: every
situation that could cause a restart is confirmed even if --restart is
given.
This commit is contained in:
Joshua Boniface 2023-11-01 12:05:52 -04:00
parent 79e5c098cd
commit bc425b9224
1 changed files with 1 additions and 0 deletions

View File

@ -180,6 +180,7 @@ def restart_opt(function):
abort=True,
)
kwargs["restart_flag"] = True
kwargs["confirm_flag"] = True
except Exception:
echo(CLI_CONFIG, "Changes will be applied on next VM start/restart.")
kwargs["restart_flag"] = False