Catch os... errors

This commit is contained in:
Bwko 2016-12-01 00:56:15 +01:00 committed by Kim "BKC" Carlbäcker
parent 5ab85372da
commit 4ff0db0246
14 changed files with 123 additions and 29 deletions

View file

@ -10,6 +10,8 @@ import (
"os"
"runtime"
"code.gitea.io/gitea/modules/log"
"code.gitea.io/gitea/cmd"
"code.gitea.io/gitea/modules/setting"
"github.com/urfave/cli"
@ -37,5 +39,9 @@ func main() {
cmd.CmdAdmin,
}
app.Flags = append(app.Flags, []cli.Flag{}...)
app.Run(os.Args)
err := app.Run(os.Args)
if err != nil {
log.Fatal(4, "Fail to run app with %s: %v", os.Args, err)
}
}