From 5b6a503fd1e7e3a3828c769bfeb050f4ac33d585 Mon Sep 17 00:00:00 2001 From: Nikolai Rodionov Date: Thu, 25 Jul 2024 19:34:10 +0200 Subject: [PATCH] Add a chart directory --- internal/utils/githelper/git.go | 3 +++ internal/utils/workdir/workdir.go | 3 +++ 2 files changed, 6 insertions(+) diff --git a/internal/utils/githelper/git.go b/internal/utils/githelper/git.go index 94fd257..566e6c2 100644 --- a/internal/utils/githelper/git.go +++ b/internal/utils/githelper/git.go @@ -35,6 +35,9 @@ func (g *Git) CloneRepo(workdir, gitURL string, dry bool) error { if err != nil { return err } + if err := os.Mkdir(workdir+"/charts", os.ModePerm); err != nil { + return err + } r, err := git.PlainInit(workdir, false) if err != nil { return err diff --git a/internal/utils/workdir/workdir.go b/internal/utils/workdir/workdir.go index 5d3705e..8e82d49 100644 --- a/internal/utils/workdir/workdir.go +++ b/internal/utils/workdir/workdir.go @@ -27,7 +27,10 @@ func CreateWorkdir(ctx context.Context, path string) (workdir string, err error) if err != nil { return workdir, err } + } + if err := os.Mkdir(workdir+"/.charts", os.ModePerm); err != nil { + return "", err } return workdir, nil }