add virt
This commit is contained in:
@@ -47,6 +47,7 @@ pub fn (mut c UIConsole) ask_question(args QuestionArgs) !string {
|
||||
description: args.description
|
||||
warning: 'Min lenght of answer is: ${args.minlen}'
|
||||
question: args.question
|
||||
default: args.default
|
||||
)
|
||||
}
|
||||
return choice
|
||||
|
||||
@@ -31,7 +31,7 @@ pub fn (mut c UIConsole) ask_yesno(args YesNoArgs) !bool {
|
||||
print_debug('${question} (y/n) : ')
|
||||
choice := os.get_raw_line().trim(' \n').to_lower()
|
||||
if choice.trim_space() == "" {
|
||||
return true
|
||||
return args.default
|
||||
}
|
||||
if choice.starts_with('y') {
|
||||
return true
|
||||
@@ -50,5 +50,6 @@ pub fn (mut c UIConsole) ask_yesno(args YesNoArgs) !bool {
|
||||
question: args.question
|
||||
warning: "Please choose 'y' or 'n', then enter."
|
||||
reset: true
|
||||
default: args.default
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user