Default the install prompts to yes
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
3935e2d5e2
commit
6064bd650d
2 files changed
+5
-5
No files matched your search
+3
-3
@@ -157,13 +157,13 @@ EOF
|
||||
}
|
||||
|
||||
# Ask a yes/no question on the terminal; fails when there is none or the answer
|
||||
# is not yes. stdout carries the printed path, so all dialogue goes to /dev/tty.
|
||||
# is not yes (an empty answer means yes). stdout carries the printed path, so all dialogue goes to /dev/tty.
|
||||
ask_yes_no() {
|
||||
local answer
|
||||
{ : </dev/tty >/dev/tty; } 2>/dev/null || return 1
|
||||
printf '%s [y/N] ' "$1" >/dev/tty
|
||||
printf '%s [Y/n] ' "$1" >/dev/tty
|
||||
read -r answer </dev/tty || return 1
|
||||
[[ "$answer" == [yY] || "$answer" == [yY][eE][sS] ]]
|
||||
[[ -z "$answer" || "$answer" == [yY] || "$answer" == [yY][eE][sS] ]]
|
||||
}
|
||||
|
||||
# Print the base QCOW2 path. When the image does not exist and a terminal is
|
||||
|
||||
Reference in new issue
Block a user