aboutsummaryrefslogtreecommitdiffstats
path: root/main.go
diff options
context:
space:
mode:
authorMorgan Bazalgette <git@howl.moe>2018-01-10 05:58:08 +0100
committerLauris BH <lauris@nix.lv>2018-01-10 06:58:08 +0200
commit88a3bb6d42536d0458b48269b26d821d59055fe2 (patch)
treeb3a50c3bfb4f042fdc87e2f9f9dcd0a925f95cb4 /main.go
parentb5fba4cd426a84927aeac1fac1af3b3c713203ac (diff)
downloadgitea-88a3bb6d42536d0458b48269b26d821d59055fe2.tar.gz
gitea-88a3bb6d42536d0458b48269b26d821d59055fe2.zip
Make the default action for the gitea executable that of running the webserver (#3331)
Diffstat (limited to 'main.go')
-rw-r--r--main.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/main.go b/main.go
index ec7324ee02..c9cea713d3 100644
--- a/main.go
+++ b/main.go
@@ -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)