Inverse behavior for server flag

This commit is contained in:
Jan Eitzinger 2022-09-11 07:08:28 +02:00
parent 882dc011b9
commit 80583323c0

View File

@ -46,11 +46,11 @@ import (
)
func main() {
var flagReinitDB, flagStopImmediately, flagSyncLDAP, flagGops, flagDev bool
var flagReinitDB, flagServer, flagSyncLDAP, flagGops, flagDev bool
var flagNewUser, flagDelUser, flagGenJWT, flagConfigFile string
flag.BoolVar(&flagReinitDB, "init-db", false, "Go through job-archive and re-initialize the 'job', 'tag', and 'jobtag' tables (all running jobs will be lost!)")
flag.BoolVar(&flagSyncLDAP, "sync-ldap", false, "Sync the 'user' table with ldap")
flag.BoolVar(&flagStopImmediately, "no-server", false, "Do not start a server, stop right after initialization and argument handling")
flag.BoolVar(&flagServer, "server", false, "Do not start a server, stop right after initialization and argument handling")
flag.BoolVar(&flagGops, "gops", false, "Listen via github.com/google/gops/agent (for debugging)")
flag.BoolVar(&flagDev, "dev", false, "Enable development components: GraphQL Playground and Swagger UI")
flag.StringVar(&flagConfigFile, "config", "./config.json", "Overwrite the global config options by those specified in `config.json`")
@ -163,7 +163,7 @@ func main() {
}
}
if flagStopImmediately {
if !flagServer {
return
}