You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: main.go
+15-8
Original file line number
Diff line number
Diff line change
@@ -87,25 +87,31 @@ func main() {
87
87
app.Description=`By default, Gitea will start serving using the web-server with no argument, which can alternatively be run by running the subcommand "web".`
88
88
app.Version=Version+formatBuiltWith()
89
89
app.EnableBashCompletion=true
90
-
app.Commands= []cli.Command{
90
+
91
+
// these sub-commands need to use config file
92
+
subCmdWithIni:= []cli.Command{
91
93
cmd.CmdWeb,
92
94
cmd.CmdServ,
93
95
cmd.CmdHook,
94
96
cmd.CmdDump,
95
-
cmd.CmdCert,
96
97
cmd.CmdAdmin,
97
-
cmd.CmdGenerate,
98
98
cmd.CmdMigrate,
99
99
cmd.CmdKeys,
100
100
cmd.CmdConvert,
101
101
cmd.CmdDoctor,
102
102
cmd.CmdManager,
103
-
cmd.Cmdembedded,
103
+
cmd.CmdEmbedded,
104
104
cmd.CmdMigrateStorage,
105
-
cmd.CmdDocs,
106
105
cmd.CmdDumpRepository,
107
106
cmd.CmdRestoreRepository,
108
107
cmd.CmdActions,
108
+
cmdHelp, // TODO: the "help" sub-command was used to show the more information for "work path" and "custom config", in the future, it should avoid doing so
109
+
}
110
+
// these sub-commands do not need the config file, and they do not depend on any path or environment variable.
111
+
subCmdStandalone:= []cli.Command{
112
+
cmd.CmdCert,
113
+
cmd.CmdGenerate,
114
+
cmd.CmdDocs,
109
115
}
110
116
111
117
// shared configuration flags, they are for global and for each sub-command at the same time
0 commit comments