diff options
Diffstat (limited to 'lib/xdsconfig')
-rw-r--r-- | lib/xdsconfig/fileconfig.go | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/lib/xdsconfig/fileconfig.go b/lib/xdsconfig/fileconfig.go index b786a24..374afa3 100644 --- a/lib/xdsconfig/fileconfig.go +++ b/lib/xdsconfig/fileconfig.go @@ -122,13 +122,6 @@ func readGlobalConfig(c *Config, confFile string) error { if fCfg.SThgConf != nil { vars = append(vars, &fCfg.SThgConf.Home, &fCfg.SThgConf.BinDir) } - for _, field := range vars { - var err error - if *field, err = common.ResolveEnvVar(*field); err != nil { - return err - } - } - // Use config file settings else use default config if fCfg.WebAppDir == "" { fCfg.WebAppDir = c.FileConf.WebAppDir @@ -149,6 +142,13 @@ func readGlobalConfig(c *Config, confFile string) error { fCfg.LogsDir = c.FileConf.LogsDir } + for _, field := range vars { + var err error + if *field, err = common.ResolveEnvVar(*field); err != nil { + return err + } + } + // Resolve webapp dir (support relative or full path) fCfg.WebAppDir = strings.Trim(fCfg.WebAppDir, " ") if !strings.HasPrefix(fCfg.WebAppDir, "/") && exePath != "" { |