File tree 2 files changed +10
-0
lines changed
2 files changed +10
-0
lines changed Original file line number Diff line number Diff line change 73
73
Value : "" ,
74
74
Usage : "New password to set for user" ,
75
75
},
76
+ cli.StringFlag {
77
+ Name : "config, c" ,
78
+ Value : "custom/conf/app.ini" ,
79
+ Usage : "Custom configuration file path" ,
80
+ },
76
81
},
77
82
}
78
83
@@ -123,6 +128,10 @@ func runChangePassword(c *cli.Context) error {
123
128
return err
124
129
}
125
130
131
+ if c .IsSet ("config" ) {
132
+ setting .CustomConf = c .String ("config" )
133
+ }
134
+
126
135
if err := initDB (); err != nil {
127
136
return err
128
137
}
Original file line number Diff line number Diff line change @@ -62,6 +62,7 @@ Admin operations:
62
62
- Options:
63
63
- ` --username value ` , ` -u value ` : Username. Required.
64
64
- ` --password value ` , ` -p value ` : New password. Required.
65
+ - ` --config path ` : Gitea configuration file path. Optional. (default: custom/conf/app.ini).
65
66
- Examples:
66
67
- ` gitea admin change-password --username myname --password asecurepassword `
67
68
- ` regenerate `
You can’t perform that action at this time.
0 commit comments