mirror of
https://github.com/helmfile/helmfile.git
synced 2026-10-21 12:50:02 +02:00
feat: add HELMFILE_INTERACTIVE env var to enable interactive mode (#1787)
* feat: add HELMFILE_INTERACTIVE env var to enable interactive mode This commit adds the `HELMFILE_INTERACTIVE` environment variable to enable the interactive mode by default. Anything other than `true` will disable the interactive mode. The precedence has the `--interactive` flag. Signed-off-by: Krzysztof Łuczak <krzysztof.luczak.pro@gmail.com> * Trim trailing whitespaces Signed-off-by: Krzysztof Łuczak <krzysztof.luczak.pro@gmail.com> --------- Signed-off-by: Krzysztof Łuczak <krzysztof.luczak.pro@gmail.com>
This commit is contained in:
@@ -246,7 +246,10 @@ func (g *GlobalImpl) ValidateConfig() error {
|
||||
|
||||
// Interactive returns the Interactive
|
||||
func (g *GlobalImpl) Interactive() bool {
|
||||
return g.GlobalOptions.Interactive
|
||||
if g.GlobalOptions.Interactive {
|
||||
return true
|
||||
}
|
||||
return os.Getenv(envvar.Interactive) == "true"
|
||||
}
|
||||
|
||||
// Args returns the args to use for helm
|
||||
|
||||
@@ -18,4 +18,5 @@ const (
|
||||
V1Mode = "HELMFILE_V1MODE"
|
||||
GoccyGoYaml = "HELMFILE_GOCCY_GOYAML"
|
||||
CacheHome = "HELMFILE_CACHE_HOME"
|
||||
Interactive = "HELMFILE_INTERACTIVE"
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user