File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed
contrib/environment-to-ini Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -75,6 +75,8 @@ func main() {
7575}
7676
7777func runEnvironmentToIni (c * cli.Context ) error {
78+ // the config system may change the environment variables, so get a copy first, to be used later
79+ env := append ([]string {}, os .Environ ()... )
7880 setting .InitWorkPathAndCfgProvider (os .Getenv , setting.ArgWorkPathAndCustomConf {
7981 WorkPath : c .String ("work-path" ),
8082 CustomPath : c .String ("custom-path" ),
@@ -86,7 +88,7 @@ func runEnvironmentToIni(c *cli.Context) error {
8688 log .Fatal ("Failed to load custom conf '%s': %v" , setting .CustomConf , err )
8789 }
8890
89- changed := setting .EnvironmentToConfig (cfg , os . Environ () )
91+ changed := setting .EnvironmentToConfig (cfg , env )
9092
9193 // try to save the config file
9294 destination := c .String ("out" )
You can’t perform that action at this time.
0 commit comments