Merge pull request #22 from itscaro/qtran/issue-2118

(fix) chartify process when chart path is absolute
This commit is contained in:
Yusuke Kuoka
2022-04-14 08:25:13 +09:00
committed by GitHub
3 changed files with 15 additions and 1 deletions
+5 -1
View File
@@ -100,7 +100,10 @@ func (st *HelmState) PrepareChartify(helm helmexec.Interface, release *ReleaseSp
var shouldRun bool
dir := filepath.Join(st.basePath, chart)
dir := chart
if !filepath.IsAbs(chart) {
dir = filepath.Join(st.basePath, chart)
}
if stat, _ := os.Stat(dir); stat != nil && stat.IsDir() {
if exists, err := st.fileExists(filepath.Join(dir, "Chart.yaml")); err == nil && !exists {
shouldRun = true
@@ -180,6 +183,7 @@ func (st *HelmState) PrepareChartify(helm helmexec.Interface, release *ReleaseSp
}
if shouldRun {
st.logger.Debugf("Chartify process for %s", dir)
generatedFiles, err := st.generateValuesFiles(helm, release, workerIndex)
if err != nil {
return nil, clean, err