[pbs-devel] applied: [PATCH proxmox-backup v2] cli: add interactive confirmation for block device wipe

Thomas Lamprecht t.lamprecht at proxmox.com
Wed Nov 29 15:04:27 CET 2023


Am 29/11/2023 um 14:20 schrieb Markus Frank:
> If stdin is a TTY, an interactive prompt is added to confirm the deletion
> of a block device, ensuring user verification before proceeding.
> 
> Signed-off-by: Markus Frank <m.frank at proxmox.com>
> ---
> v2:
> * changed stdin_isatty() to std::io::stdin().is_terminal()
> * removed unnecessary eprint
> * do not loop if answer is not either y/Y or n/N
> * moved err inline in bail
> 
>  src/bin/proxmox_backup_manager/disk.rs | 21 +++++++++++++++++++++
>  1 file changed, 21 insertions(+)
> 
>

applied, but dropped the now useless loop in a follow-up and changed
the output target for the prompt message from stderr to stdout, thanks!




More information about the pbs-devel mailing list