fix: absolute paths to helmfiles should work (#498)

Fixes #488
This commit is contained in:
KUOKA Yusuke
2019-03-20 17:45:48 +09:00
committed by GitHub
parent c4eb95f3ec
commit acbb416028
+7 -2
View File
@@ -308,8 +308,13 @@ func (a *App) loadDesiredStateFromYaml(yaml []byte, file string, namespace strin
helmfiles := []string{}
for _, globPattern := range st.Helmfiles {
helmfileRelativePattern := st.JoinBase(globPattern)
matches, err := a.glob(helmfileRelativePattern)
var absPathPattern string
if filepath.IsAbs(globPattern) {
absPathPattern = globPattern
} else {
absPathPattern = st.JoinBase(globPattern)
}
matches, err := a.glob(absPathPattern)
if err != nil {
return nil, fmt.Errorf("failed processing %s: %v", globPattern, err)
}