From 18271677d6d2b8894eb3a5ec32ce06f2642bff56 Mon Sep 17 00:00:00 2001 From: Kevin Franklin Kim Date: Mon, 29 Jan 2024 11:41:13 +0100 Subject: [PATCH] feat: split up chart args --- squadron.go | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/squadron.go b/squadron.go index d22cec5..7ea1342 100644 --- a/squadron.go +++ b/squadron.go @@ -554,7 +554,13 @@ func (sq *Squadron) Up(ctx context.Context, helmArgs []string, username, version if strings.Contains(v.Chart.Repository, "file://") { cmd.Args(strings.TrimPrefix(v.Chart.Repository, "file://")) } else { - cmd.Args(v.Chart.Name, "--repo", v.Chart.Repository, "--version", v.Chart.Version) + cmd.Args(v.Chart.Name) + if v.Chart.Repository != "" { + cmd.Args("--repo", v.Chart.Repository) + } + if v.Chart.Version != "" { + cmd.Args("--version", v.Chart.Version) + } } if out, err := cmd.Run(gctx); err != nil {