File tree Expand file tree Collapse file tree 1 file changed +4
-8
lines changed
Expand file tree Collapse file tree 1 file changed +4
-8
lines changed Original file line number Diff line number Diff line change @@ -69,7 +69,7 @@ $ ./gitea config edit-ini --config app.ini --config-keep-keys app-template.ini -
6969 },
7070 & cli.BoolFlag {
7171 Name : "in-place" ,
72- Usage : "Output to the same config file as input." ,
72+ Usage : "Output to the same config file as input. This flag will be ignored if --out is set. " ,
7373 },
7474 & cli.StringFlag {
7575 Name : "out" ,
@@ -103,15 +103,11 @@ func runConfigUpdateIni(_ context.Context, c *cli.Command) error {
103103
104104 inPlace := c .Bool ("in-place" )
105105 configFileOut := c .String ("out" )
106- if inPlace {
107- if configFileOut != "" {
108- return errors .New ("cannot use --in-place and --out together" )
109- }
110- configFileOut = configFileIn
111- } else {
112- if configFileOut == "" {
106+ if configFileOut == "" {
107+ if ! inPlace {
113108 return errors .New ("either --in-place or --out must be specified" )
114109 }
110+ configFileOut = configFileIn // in-place edit
115111 }
116112
117113 needWriteOut := configFileOut != configFileIn
You can’t perform that action at this time.
0 commit comments