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
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 != "" {