Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions pkg/util/confirm.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@ import (
// Confirm shows the argument prompt to the user and returns a boolean based on whether or not
// the user confirms that it's ok to continue.
func Confirm(prompt string, skip bool) (bool, error) {
fmt.Printf("%s (yes/no) ", prompt)

if skip {
log.Infof("Automatically answering yes because skip is set to true")
return true, nil
}

fmt.Printf("%s (yes/no) ", prompt)

var response string
_, err := fmt.Scanln(&response)
if err != nil {
Expand Down