From bc425b9224de9ed740fc2fd3911bd6756a6fcb43 Mon Sep 17 00:00:00 2001 From: "Joshua M. Boniface" Date: Wed, 1 Nov 2023 12:05:52 -0400 Subject: [PATCH] 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. --- client-cli/pvc/cli/cli.py | 1 + 1 file changed, 1 insertion(+) diff --git a/client-cli/pvc/cli/cli.py b/client-cli/pvc/cli/cli.py index 2538de5c..4e28840b 100644 --- a/client-cli/pvc/cli/cli.py +++ b/client-cli/pvc/cli/cli.py @@ -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