Skip to content
This repository was archived by the owner on Jan 22, 2026. It is now read-only.

Commit 2f6dc7c

Browse files
committed
virt-install: If in --prompt mode, ask about overwriting existing disk
1 parent 775b223 commit 2f6dc7c

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

virtinst/cli.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -494,7 +494,8 @@ def disk_prompt(prompt_txt, arg_dict, warn_overwrite=False, prompt_size=True,
494494
askmsg = _("Do you really want to use this disk (yes or no)")
495495

496496
# Prompt if disk file already exists and preserve mode is not used
497-
if (path_exists and dev.type == dev.TYPE_FILE and warn_overwrite):
497+
if ((path_exists and dev.type == dev.TYPE_FILE and warn_overwrite) or
498+
is_prompt()):
498499
msg = (_("This will overwrite the existing path '%s'" %
499500
dev.path))
500501
if not prompt_for_yes_or_no(msg, askmsg):

0 commit comments

Comments
 (0)