From cf01221f3af516652e2b1d8bf8b2b7d7ee8a55b5 Mon Sep 17 00:00:00 2001 From: Shane Starcher Date: Tue, 24 Apr 2018 09:01:42 -0400 Subject: [PATCH] support relative path for is local check --- state/state.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/state/state.go b/state/state.go index 4a4b39db..5e485e80 100644 --- a/state/state.go +++ b/state/state.go @@ -399,15 +399,16 @@ func (state *HelmState) UpdateDeps(helm helmexec.Interface) []error { // be constructed relative to the `base path`. // - Everything else is assumed to be an absolute path or an actual / reference. func normalizeChart(basePath, chart string) string { - if !isLocalChart(chart) { + regex, _ := regexp.Compile("^[.]?./") + if !regex.MatchString(chart) { return chart } return filepath.Join(basePath, chart) } func isLocalChart(chart string) bool { - regex, _ := regexp.Compile("^[.]?./") - return regex.MatchString(chart) + _, err := os.Stat(chart) + return err == nil } func flagsForRelease(helm helmexec.Interface, basePath string, release *ReleaseSpec) ([]string, error) {