Commit d36636cc authored by ale's avatar ale

correctly detect empty lines

parent 8a027130
......@@ -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))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment