summaryrefslogtreecommitdiffstats
path: root/contrib
diff options
context:
space:
mode:
authorFolke <folke@ashberg.de>2023-11-06 21:36:58 +0100
committerGitHub <noreply@github.com>2023-11-06 21:36:58 +0100
commitc823af26dbdd631b17bcd8c3f249e44d8adc4708 (patch)
tree4645d7f8e2c601203f21f382620689ac6cd0f8fc /contrib
parent0999721c7b4d124c1f14bbd067acdcf767542abb (diff)
downloadgitea-c823af26dbdd631b17bcd8c3f249e44d8adc4708.tar.gz
gitea-c823af26dbdd631b17bcd8c3f249e44d8adc4708.zip
Update environment-to-ini flag parsing (#27914)
This Fixes #27913 This commit updates `environment-to-ini` to be compatible with update urfave/cli/v2 Doc: <https://cli.urfave.org/v2/examples/combining-short-options/>
Diffstat (limited to 'contrib')
-rw-r--r--contrib/environment-to-ini/environment-to-ini.go28
1 files changed, 16 insertions, 12 deletions
diff --git a/contrib/environment-to-ini/environment-to-ini.go b/contrib/environment-to-ini/environment-to-ini.go
index 7758045fd3..a7d7a6d293 100644
--- a/contrib/environment-to-ini/environment-to-ini.go
+++ b/contrib/environment-to-ini/environment-to-ini.go
@@ -47,24 +47,28 @@ func main() {
on the configuration cheat sheet.`
app.Flags = []cli.Flag{
&cli.StringFlag{
- Name: "custom-path, C",
- Value: setting.CustomPath,
- Usage: "Custom path file path",
+ Name: "custom-path",
+ Aliases: []string{"C"},
+ Value: setting.CustomPath,
+ Usage: "Custom path file path",
},
&cli.StringFlag{
- Name: "config, c",
- Value: setting.CustomConf,
- Usage: "Custom configuration file path",
+ Name: "config",
+ Aliases: []string{"c"},
+ Value: setting.CustomConf,
+ Usage: "Custom configuration file path",
},
&cli.StringFlag{
- Name: "work-path, w",
- Value: setting.AppWorkPath,
- Usage: "Set the gitea working path",
+ Name: "work-path",
+ Aliases: []string{"w"},
+ Value: setting.AppWorkPath,
+ Usage: "Set the gitea working path",
},
&cli.StringFlag{
- Name: "out, o",
- Value: "",
- Usage: "Destination file to write to",
+ Name: "out",
+ Aliases: []string{"o"},
+ Value: "",
+ Usage: "Destination file to write to",
},
}
app.Action = runEnvironmentToIni