1
1
mirror of https://github.com/go-gitea/gitea synced 2025-07-22 18:28:37 +00:00

Fix incorrect cli default values and default command (#34765)

This commit is contained in:
wxiaoguang
2025-06-18 23:25:11 +08:00
committed by GitHub
parent 416ff1fd31
commit 7954f25290
7 changed files with 76 additions and 43 deletions

View File

@@ -251,6 +251,10 @@ func runWeb(_ context.Context, cmd *cli.Command) error {
}
}()
if subCmdName, valid := isValidDefaultSubCommand(cmd); !valid {
return fmt.Errorf("unknown command: %s", subCmdName)
}
managerCtx, cancel := context.WithCancel(context.Background())
graceful.InitManager(managerCtx)
defer cancel()