mirror of
https://github.com/moul/sshportal.git
synced 2025-10-03 18:05:30 +08:00
Merge pull request #14 from moul/dev/moul/fix-13
Fix panic when entering empty command
This commit is contained in:
commit
e32f4200d1
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…
Add table
Reference in a new issue