diff --git a/cmd/main.go b/cmd/main.go index fa26bf0a07..65cde47884 100644 --- a/cmd/main.go +++ b/cmd/main.go @@ -204,9 +204,6 @@ func innerNewMainApp(version, versionExtra string, subCmdsStandaloneArgs, subCmd for i := range subCmdWithConfig { prepareSubcommandWithConfig(subCmdWithConfig[i], globalFlags) } - for i := range subCmdStandalone { - subCmdStandalone[i].Flags = append(subCmdStandalone[i].Flags, cli.HelpFlag) - } app.Commands = append(app.Commands, subCmdWithConfig...) app.Commands = append(app.Commands, subCmdStandalone...) diff --git a/cmd/main_test.go b/cmd/main_test.go index e984ed10e8..1ec3471343 100644 --- a/cmd/main_test.go +++ b/cmd/main_test.go @@ -113,16 +113,6 @@ func TestCliCmd(t *testing.T) { cmd: "./gitea forgejo-cli --help", exp: "(subcommand help template)", }, - { - env: map[string]string{"GITEA_WORK_DIR": "/tmp"}, - cmd: "./gitea cert --help", - exp: "(subcommand help template)", - }, - { - env: map[string]string{"GITEA_WORK_DIR": "/tmp"}, - cmd: "./gitea web --help", - exp: "(subcommand help template)", - }, } for _, c := range cases { diff --git a/go.mod b/go.mod index 51bcc8ef3f..3f7efbbb47 100644 --- a/go.mod +++ b/go.mod @@ -274,3 +274,5 @@ replace github.com/gliderlabs/ssh => code.forgejo.org/forgejo/ssh v0.0.0-2024121 replace git.sr.ht/~mariusor/go-xsd-duration => code.forgejo.org/forgejo/go-xsd-duration v0.0.0-20220703122237-02e73435a078 replace xorm.io/xorm v1.3.9 => code.forgejo.org/xorm/xorm v1.3.9-forgejo.4 + +replace github.com/urfave/cli/v3 => github.com/urfave/cli/v3 v3.5.0 diff --git a/go.sum b/go.sum index 3772678ecb..043c41b5b6 100644 --- a/go.sum +++ b/go.sum @@ -660,8 +660,8 @@ github.com/tinylib/msgp v1.6.1/go.mod h1:RSp0LW9oSxFut3KzESt5Voq4GVWyS+PSulT77ro github.com/ulikunitz/xz v0.5.8/go.mod h1:nbz6k7qbPmH4IRqmfOplQw/tblSgqTqBwxkY0oWt/14= github.com/ulikunitz/xz v0.5.15 h1:9DNdB5s+SgV3bQ2ApL10xRc35ck0DuIX/isZvIk+ubY= github.com/ulikunitz/xz v0.5.15/go.mod h1:nbz6k7qbPmH4IRqmfOplQw/tblSgqTqBwxkY0oWt/14= -github.com/urfave/cli/v3 v3.6.2 h1:lQuqiPrZ1cIz8hz+HcrG0TNZFxU70dPZ3Yl+pSrH9A8= -github.com/urfave/cli/v3 v3.6.2/go.mod h1:ysVLtOEmg2tOy6PknnYVhDoouyC/6N42TMeoMzskhso= +github.com/urfave/cli/v3 v3.5.0 h1:qCuFMmdayTF3zmjG8TSsoBzrDqszNrklYg2x3g4MSgw= +github.com/urfave/cli/v3 v3.5.0/go.mod h1:ysVLtOEmg2tOy6PknnYVhDoouyC/6N42TMeoMzskhso= github.com/valyala/fastjson v1.6.4/go.mod h1:CLCAqky6SMuOcxStkYQvblddUtoRxhYMGLrsQns1aXY= github.com/valyala/fastjson v1.6.7 h1:ZE4tRy0CIkh+qDc5McjatheGX2czdn8slQjomexVpBM= github.com/valyala/fastjson v1.6.7/go.mod h1:CLCAqky6SMuOcxStkYQvblddUtoRxhYMGLrsQns1aXY=