MCPcopy
hub / github.com/helmfile/helmfile / processLocalChart

Method processLocalChart

pkg/state/state.go:1932–1946  ·  view source on GitHub ↗

processLocalChart handles local chart processing

(normalizedChart, dir string, release *ReleaseSpec, helmfileCommand string, opts ChartPrepareOptions, isLocal bool)

Source from the content-addressed store, hash-verified

1930
1931// processLocalChart handles local chart processing
1932func (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.

Callers 1

Calls 2

generateChartPathMethod · 0.95
CleanMethod · 0.80

Tested by

no test coverage detected