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.
This commit is contained in:
parent
09f19047bd
commit
4fe8d988d5
|
|
@ -481,7 +481,12 @@ func flagsForRelease(helm helmexec.Interface, basePath string, release *ReleaseS
|
||||||
for _, value := range release.Values {
|
for _, value := range release.Values {
|
||||||
switch typedValue := value.(type) {
|
switch typedValue := value.(type) {
|
||||||
case string:
|
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) {
|
if _, err := os.Stat(path); os.IsNotExist(err) {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue