Skip to content
Snippets Groups Projects
Commit d36636cc authored by ale's avatar ale
Browse files

correctly detect empty lines

parent 8a027130
No related branches found
No related tags found
No related merge requests found
......@@ -44,7 +44,7 @@ func promptUserStdin(path string, choices []*liber.Metadata) (*liber.Metadata, e
fmt.Printf(prompt)
os.Stdout.Sync()
result, err := rdr.ReadString('\n')
if err != nil || result == "" {
if err != nil || result == "\n" {
break
}
idx, err := strconv.Atoi(strings.TrimSpace(result))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment