processLocalChart handles local chart processing
(normalizedChart, dir string, release *ReleaseSpec, helmfileCommand string, opts ChartPrepareOptions, isLocal bool)
| 1930 | |
| 1931 | // processLocalChart handles local chart processing |
| 1932 | func (st *HelmState) processLocalChart(normalizedChart, dir string, release *ReleaseSpec, helmfileCommand string, opts ChartPrepareOptions, isLocal bool) (string, error) { |
| 1933 | chartPath := normalizedChart |
| 1934 | if helmfileCommand == "pull" && isLocal { |
| 1935 | chartAbsPath := strings.TrimSuffix(filepath.Clean(normalizedChart), "/") |
| 1936 | var err error |
| 1937 | chartPath, err = st.generateChartPath(filepath.Base(chartAbsPath), dir, release, opts.OutputDirTemplate) |
| 1938 | if err != nil { |
| 1939 | return "", err |
| 1940 | } |
| 1941 | if err := st.fs.CopyDir(normalizedChart, filepath.Clean(chartPath)); err != nil { |
| 1942 | return "", err |
| 1943 | } |
| 1944 | } |
| 1945 | return chartPath, nil |
| 1946 | } |
| 1947 | |
| 1948 | // forcedDownloadChart handles forced chart downloads. |
| 1949 | // Locks are acquired during download and released immediately after. |
no test coverage detected