support relative path for is local check
This commit is contained in:
parent
ca26d757f7
commit
cf01221f3a
|
|
@ -399,15 +399,16 @@ func (state *HelmState) UpdateDeps(helm helmexec.Interface) []error {
|
||||||
// be constructed relative to the `base path`.
|
// be constructed relative to the `base path`.
|
||||||
// - Everything else is assumed to be an absolute path or an actual <repository>/<chart> reference.
|
// - Everything else is assumed to be an absolute path or an actual <repository>/<chart> reference.
|
||||||
func normalizeChart(basePath, chart string) string {
|
func normalizeChart(basePath, chart string) string {
|
||||||
if !isLocalChart(chart) {
|
regex, _ := regexp.Compile("^[.]?./")
|
||||||
|
if !regex.MatchString(chart) {
|
||||||
return chart
|
return chart
|
||||||
}
|
}
|
||||||
return filepath.Join(basePath, chart)
|
return filepath.Join(basePath, chart)
|
||||||
}
|
}
|
||||||
|
|
||||||
func isLocalChart(chart string) bool {
|
func isLocalChart(chart string) bool {
|
||||||
regex, _ := regexp.Compile("^[.]?./")
|
_, err := os.Stat(chart)
|
||||||
return regex.MatchString(chart)
|
return err == nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func flagsForRelease(helm helmexec.Interface, basePath string, release *ReleaseSpec) ([]string, error) {
|
func flagsForRelease(helm helmexec.Interface, basePath string, release *ReleaseSpec) ([]string, error) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue