mirror of
https://github.com/moul/sshportal.git
synced 2024-11-10 09:12:49 +08:00
Fix panic when entering empty command (fix #13)
This commit is contained in:
parent
a413aa86c2
commit
7ed60f6908
2 changed files with 4 additions and 1 deletions
|
@ -2,7 +2,7 @@
|
|||
|
||||
## master (unreleased)
|
||||
|
||||
* No entry
|
||||
* Fix panic when entering empty command (fix [#13](https://github.com/moul/sshportal/issues/13))
|
||||
|
||||
## v1.6.0 (2017-12-12)
|
||||
|
||||
|
|
3
shell.go
3
shell.go
|
@ -1918,6 +1918,9 @@ GLOBAL OPTIONS:
|
|||
if len(words) == 1 && strings.ToLower(words[0]) == "exit" {
|
||||
return s.Exit(0)
|
||||
}
|
||||
if len(words) == 0 {
|
||||
continue
|
||||
}
|
||||
NewEvent("shell", words[0]).SetAuthor(&myself).SetArg("interactive", true).SetArg("args", words[1:]).Log(db)
|
||||
if err := app.Run(append([]string{"config"}, words...)); err != nil {
|
||||
if cliErr, ok := err.(*cli.ExitError); ok {
|
||||
|
|
Loading…
Reference in a new issue