Skip to content

Commit

Permalink
Make the default action for the gitea executable that of running the …
Browse files Browse the repository at this point in the history
…webserver (go-gitea#3331)
  • Loading branch information
thehowl authored and lafriks committed Jan 10, 2018
1 parent b5fba4c commit 88a3bb6
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ func main() {
app := cli.NewApp()
app.Name = "Gitea"
app.Usage = "A painless self-hosted Git service"
app.Description = `By default, gitea will start serving using the webserver with no
arguments - which can alternatively be run by running the subcommand web.`
app.Version = Version + formatBuiltWith(Tags)
app.Commands = []cli.Command{
cmd.CmdWeb,
Expand All @@ -45,6 +47,7 @@ func main() {
cmd.CmdAdmin,
}
app.Flags = append(app.Flags, []cli.Flag{}...)
app.Action = cmd.CmdWeb.Action
err := app.Run(os.Args)
if err != nil {
log.Fatal(4, "Failed to run app with %s: %v", os.Args, err)
Expand Down

0 comments on commit 88a3bb6

Please sign in to comment.