Proposal: Do not prompt for confirmation when '-I' is set

Change made in response to this question https://forums.ventoy.net/showthread.php?tid=475

Should -I perform the installation without user prompt?
This commit is contained in:
Dylan M. Taylor 2020-08-24 21:21:59 -04:00 committed by GitHub
parent 1bf3e73373
commit 429080cc7f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -175,28 +175,29 @@ if [ "$MODE" = "install" ]; then
fi
echo ''
vtwarn "Attention:"
vtwarn "You will install Ventoy to $DISK."
vtwarn "All the data on the disk $DISK will be lost!!!"
echo ""
read -p 'Continue? (y/n)' Answer
if [ "$Answer" != "y" ]; then
if [ "$Answer" != "Y" ]; then
exit 0
if [ -z "$FORCE" ]; then
vtwarn "Attention:"
vtwarn "You will install Ventoy to $DISK."
vtwarn "All the data on the disk $DISK will be lost!!!"
echo ""
read -p 'Continue? (y/n)' Answer
if [ "$Answer" != "y" ]; then
if [ "$Answer" != "Y" ]; then
exit 0
fi
fi
echo ""
vtwarn "All the data on the disk $DISK will be lost!!!"
read -p 'Double-check. Continue? (y/n)' Answer
if [ "$Answer" != "y" ]; then
if [ "$Answer" != "Y" ]; then
exit 0
fi
fi
fi
echo ""
vtwarn "All the data on the disk $DISK will be lost!!!"
read -p 'Double-check. Continue? (y/n)' Answer
if [ "$Answer" != "y" ]; then
if [ "$Answer" != "Y" ]; then
exit 0
fi
fi
if [ $disk_sector_num -le $VENTOY_SECTOR_NUM ]; then
vterr "No enough space in disk $DISK"
exit 1