You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently config validation is being done in the root init function which gets called before any command code.
The config code is going through variables and making sure they are uppercase, but this should only be done when running a deploy command. It is not needed for the other commands.
for pkgName, pkgVar := range bundleCfg.DeployOpts.Variables {
for varName, varValue := range pkgVar {
// delete the lowercase var and replace with uppercase
delete(bundleCfg.DeployOpts.Variables[pkgName], varName)
bundleCfg.DeployOpts.Variables[pkgName][strings.ToUpper(varName)] = varValue
}
}
// ensure the DeployOpts.SharedVariables vars are uppercase
for varName, varValue := range bundleCfg.DeployOpts.SharedVariables {
// delete the lowercase var and replace with uppercase
delete(bundleCfg.DeployOpts.SharedVariables, varName)
bundleCfg.DeployOpts.SharedVariables[strings.ToUpper(varName)] = varValue
}
Possible solution:
calling the loadViperConfig function in the preRun for every command and refactoring the loadViperConfig function to take in the cmd that is being called. That cmd can then be used to to check if those for loops need to run.
The text was updated successfully, but these errors were encountered:
follow on to #618
Currently config validation is being done in the root init function which gets called before any command code.
The config code is going through variables and making sure they are uppercase, but this should only be done when running a
deploy
command. It is not needed for the other commands.Possible solution:
cmd
that is being called. Thatcmd
can then be used to to check if those for loops need to run.The text was updated successfully, but these errors were encountered: