Unverified Commit 55b5f5dc authored by Michael Yang's avatar Michael Yang Committed by GitHub
Browse files

ctrl+c on empty line exits (#135)

parent 3b135ac9
...@@ -276,6 +276,10 @@ func generateInteractive(cmd *cobra.Command, model string) error { ...@@ -276,6 +276,10 @@ func generateInteractive(cmd *cobra.Command, model string) error {
case errors.Is(err, io.EOF): case errors.Is(err, io.EOF):
return nil return nil
case errors.Is(err, readline.ErrInterrupt): case errors.Is(err, readline.ErrInterrupt):
if line == "" {
return nil
}
continue continue
case err != nil: case err != nil:
return err return err
......
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