0
0
Fork 0
mirror of https://github.com/go-gitea/gitea synced 2024-11-21 22:01:18 +01:00

Make the default action for the gitea executable that of running the webserver (#3331)

This commit is contained in:
Morgan Bazalgette 2018-01-10 05:58:08 +01:00 committed by Lauris BH
parent b5fba4cd42
commit 88a3bb6d42

View file

@ -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,
@ -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)