MCPcopy
hub / github.com/helmfile/helmfile / normalizeChart

Function normalizeChart

pkg/state/util.go:60–65  ·  view source on GitHub ↗

normalizeChart allows for the distinction between a file path reference and repository references. - Any single (or double character) followed by a `/` will be considered a local file reference and be constructed relative to the `base path`. - Everything else is assumed to be an absolute path or an

(basePath, chart string)

Source from the content-addressed store, hash-verified

58// be constructed relative to the `base path`.
59// - Everything else is assumed to be an absolute path or an actual <repository>/<chart> reference.
60func normalizeChart(basePath, chart string) string {
61 if !isLocalChart(chart) || filepath.IsAbs(chart) {
62 return chart
63 }
64 return filepath.Join(basePath, chart)
65}
66
67func getBuildDepsFlags(cpr *chartPrepareResult) []string {
68 flags := []string{}

Calls 1

isLocalChartFunction · 0.85