Skip to content

Commit

Permalink
refactor: show command help message. (#1486)
Browse files Browse the repository at this point in the history
  • Loading branch information
appleboy authored Apr 12, 2017
1 parent be6edad commit 2229594
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 3 deletions.
4 changes: 2 additions & 2 deletions cmd/admin.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ package cmd
import (
"fmt"

"github.com/urfave/cli"

"code.gitea.io/gitea/models"
"code.gitea.io/gitea/modules/setting"

"github.com/urfave/cli"
)

var (
Expand Down
1 change: 1 addition & 0 deletions cmd/dump.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import (

"code.gitea.io/gitea/models"
"code.gitea.io/gitea/modules/setting"

"github.com/Unknwon/cae/zip"
"github.com/Unknwon/com"
"github.com/urfave/cli"
Expand Down
4 changes: 3 additions & 1 deletion cmd/serv.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import (
"code.gitea.io/gitea/models"
"code.gitea.io/gitea/modules/log"
"code.gitea.io/gitea/modules/setting"

"github.com/Unknwon/com"
"github.com/dgrijalva/jwt-go"
"github.com/urfave/cli"
Expand Down Expand Up @@ -105,7 +106,8 @@ func runServ(c *cli.Context) error {
}

if len(c.Args()) < 1 {
fail("Not enough arguments", "Not enough arguments")
cli.ShowSubcommandHelp(c)
return nil
}

cmd := os.Getenv("SSH_ORIGINAL_COMMAND")
Expand Down
1 change: 1 addition & 0 deletions cmd/web_graceful.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import (
"net/http"

"code.gitea.io/gitea/modules/log"

"github.com/facebookgo/grace/gracehttp"
)

Expand Down

0 comments on commit 2229594

Please sign in to comment.