Skip to content

Commit

Permalink
Fixes #21 - Exit command not found
Browse files Browse the repository at this point in the history
  • Loading branch information
jamesnetherton committed Oct 14, 2018
1 parent 3822bda commit 9e22440
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions cli/cli.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,14 @@ func (c *CLI) Run() {

for {
line, err := c.readline.Readline()
line = strings.TrimSpace(line)

if err == readline.ErrInterrupt {
continue
} else if err == io.EOF {
} else if err == io.EOF || line == "exit" {
break
}

line = strings.TrimSpace(line)
if !service.StringIsEmpty(line) {
commandLine := strings.Split(line, " ")
commandName := commandLine[0]
Expand Down

0 comments on commit 9e22440

Please sign in to comment.