ctrl+c on empty line exits (#135)
This commit is contained in:
parent
3b135ac963
commit
55b5f5dc34
1 changed files with 4 additions and 0 deletions
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue