diff --git a/pkg/scaffold/creator.go b/pkg/scaffold/creator.go index 12d12316..ff6c4ee2 100644 --- a/pkg/scaffold/creator.go +++ b/pkg/scaffold/creator.go @@ -8,6 +8,7 @@ import ( "github.com/pluralsh/plural/pkg/api" "github.com/pluralsh/plural/pkg/utils" "github.com/pluralsh/plural/pkg/utils/pathing" + "helm.sh/helm/v3/pkg/chartutil" ) var categories = []string{ @@ -77,7 +78,7 @@ func ApplicationScaffold(client api.Client) error { return err } - if err := utils.Exec("helm", "create", app); err != nil { + if err := createHelm(app); err != nil { return err } @@ -93,3 +94,9 @@ func ApplicationScaffold(client api.Client) error { return nil } + +func createHelm(name string) error { + chartname := filepath.Base(name) + _, err := chartutil.Create(chartname, filepath.Dir(name)) + return err +}