From 6de9ebccbca7dd085f5d8857f1715c20075ed40e Mon Sep 17 00:00:00 2001 From: Matthew Fisher Date: Thu, 15 Mar 2018 16:26:57 -0700 Subject: [PATCH] fix windows path issues on `helm template -x` --- cmd/helm/template.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cmd/helm/template.go b/cmd/helm/template.go index 4bfd4f7a3..3a7285fa1 100644 --- a/cmd/helm/template.go +++ b/cmd/helm/template.go @@ -122,7 +122,7 @@ func (t *templateCmd) run(cmd *cobra.Command, args []string) error { if len(t.renderFiles) > 0 { for _, f := range t.renderFiles { if !filepath.IsAbs(f) { - af, err = filepath.Abs(t.chartPath + "/" + f) + af, err = filepath.Abs(filepath.Join(t.chartPath, f)) if err != nil { return fmt.Errorf("could not resolve template path: %s", err) } @@ -232,9 +232,9 @@ func (t *templateCmd) run(cmd *cobra.Command, args []string) error { } in := func(needle string, haystack []string) bool { // make needle path absolute - d := strings.Split(needle, "/") + d := strings.Split(needle, string(os.PathSeparator)) dd := d[1:] - an := t.chartPath + "/" + strings.Join(dd, "/") + an := filepath.Join(t.chartPath, strings.Join(dd, string(os.PathSeparator))) for _, h := range haystack { if h == an {