Skip to content

Commit 6eadad8

Browse files
GiteaBotfashberg
andauthored
Update environment-to-ini flag parsing (#27914) (#27940)
Backport #27914 by @fashberg 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/> Co-authored-by: Folke <[email protected]>
1 parent a8e505a commit 6eadad8

File tree

1 file changed

+16
-12
lines changed

1 file changed

+16
-12
lines changed

contrib/environment-to-ini/environment-to-ini.go

Lines changed: 16 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -47,24 +47,28 @@ func main() {
4747
on the configuration cheat sheet.`
4848
app.Flags = []cli.Flag{
4949
&cli.StringFlag{
50-
Name: "custom-path, C",
51-
Value: setting.CustomPath,
52-
Usage: "Custom path file path",
50+
Name: "custom-path",
51+
Aliases: []string{"C"},
52+
Value: setting.CustomPath,
53+
Usage: "Custom path file path",
5354
},
5455
&cli.StringFlag{
55-
Name: "config, c",
56-
Value: setting.CustomConf,
57-
Usage: "Custom configuration file path",
56+
Name: "config",
57+
Aliases: []string{"c"},
58+
Value: setting.CustomConf,
59+
Usage: "Custom configuration file path",
5860
},
5961
&cli.StringFlag{
60-
Name: "work-path, w",
61-
Value: setting.AppWorkPath,
62-
Usage: "Set the gitea working path",
62+
Name: "work-path",
63+
Aliases: []string{"w"},
64+
Value: setting.AppWorkPath,
65+
Usage: "Set the gitea working path",
6366
},
6467
&cli.StringFlag{
65-
Name: "out, o",
66-
Value: "",
67-
Usage: "Destination file to write to",
68+
Name: "out",
69+
Aliases: []string{"o"},
70+
Value: "",
71+
Usage: "Destination file to write to",
6872
},
6973
}
7074
app.Action = runEnvironmentToIni

0 commit comments

Comments
 (0)