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:
parent
79e5c098cd
commit
bc425b9224
|
@ -180,6 +180,7 @@ def restart_opt(function):
|
||||||
abort=True,
|
abort=True,
|
||||||
)
|
)
|
||||||
kwargs["restart_flag"] = True
|
kwargs["restart_flag"] = True
|
||||||
|
kwargs["confirm_flag"] = True
|
||||||
except Exception:
|
except Exception:
|
||||||
echo(CLI_CONFIG, "Changes will be applied on next VM start/restart.")
|
echo(CLI_CONFIG, "Changes will be applied on next VM start/restart.")
|
||||||
kwargs["restart_flag"] = False
|
kwargs["restart_flag"] = False
|
||||||
|
|
Loading…
Reference in New Issue