We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9159964 commit d032500Copy full SHA for d032500
contrib/environment-to-ini/environment-to-ini.go
@@ -75,6 +75,8 @@ func main() {
75
}
76
77
func 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()...)
80
setting.InitWorkPathAndCfgProvider(os.Getenv, setting.ArgWorkPathAndCustomConf{
81
WorkPath: c.String("work-path"),
82
CustomPath: c.String("custom-path"),
@@ -86,7 +88,7 @@ func runEnvironmentToIni(c *cli.Context) error {
86
88
log.Fatal("Failed to load custom conf '%s': %v", setting.CustomConf, err)
87
89
90
- changed := setting.EnvironmentToConfig(cfg, os.Environ())
91
+ changed := setting.EnvironmentToConfig(cfg, env)
92
93
// try to save the config file
94
destination := c.String("out")
0 commit comments