Merge pull request #145 from ConnectedHomes/absolute-value-path

Don't prefix base path to absolute path
This commit is contained in:
KUOKA Yusuke 2018-05-15 22:36:40 +09:00 committed by GitHub
commit f288032d60
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 1 deletions

View File

@ -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
}