Skip to content
Merged
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
6 changes: 3 additions & 3 deletions pkg/util/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -200,12 +200,12 @@ func Ask(question, expectedResponse string, retries int) (answer string, success
attempts := 1

if retries < 0 {
fmt.Printf("Retries was set to a number less than zero (%d). Please specify a positive number of retries or zero, if you want to ask unconditionally.", retries)
fmt.Printf("Retries was set to a number less than zero (%d). Please specify a positive number of retries or zero, if you want to ask unconditionally.\n", retries)
}

for attempts <= retries {
scanner := bufio.NewScanner(os.Stdin)
fmt.Printf("%s (%d/%d) ", question, attempts, retries)
fmt.Printf("%s (%d/%d) \n", question, attempts, retries)

scanner.Scan()
answer = scanner.Text()
Expand All @@ -214,7 +214,7 @@ func Ask(question, expectedResponse string, retries int) (answer string, success
return answer, true, nil
}

fmt.Printf("Expected '%s', but got '%s'", expectedResponse, answer)
fmt.Printf("Expected '%s', but got '%s'\n", expectedResponse, answer)

attempts++
}
Expand Down