From 4fe8d988d526d48db2fc054a8e7a4e9102280c77 Mon Sep 17 00:00:00 2001 From: David Bliss Date: Tue, 15 May 2018 11:22:38 +0100 Subject: [PATCH] Don't prefix base path to absolute path If an entry in the `values` section of a helmfile is an absolute path, then it would be erroneously prefixed with the base path. This would cause `helmfile sync` to fail because the value.yaml file would not exist at the incorrectly prefixed path. --- state/state.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/state/state.go b/state/state.go index f7400147..202bfe36 100644 --- a/state/state.go +++ b/state/state.go @@ -481,7 +481,12 @@ func flagsForRelease(helm helmexec.Interface, basePath string, release *ReleaseS for _, value := range release.Values { switch typedValue := value.(type) { case string: - path := filepath.Join(basePath, typedValue) + var path string + if filepath.IsAbs(typedValue) { + path = typedValue + } else { + path = filepath.Join(basePath, typedValue) + } if _, err := os.Stat(path); os.IsNotExist(err) { return nil, err }