From 90354f26a00d7359961e8ef8e5dbd8b10645b01d Mon Sep 17 00:00:00 2001 From: Ice3man543 Date: Thu, 27 Aug 2020 18:08:12 +0530 Subject: [PATCH] Fixed errors with overwritten updated templates --- v2/internal/runner/config.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/v2/internal/runner/config.go b/v2/internal/runner/config.go index 1a087d7f..5372f45f 100644 --- a/v2/internal/runner/config.go +++ b/v2/internal/runner/config.go @@ -311,7 +311,7 @@ func (r *Runner) downloadReleaseAndUnzip(downloadURL string) error { templateDirectory := path.Join(r.templatesConfig.TemplatesDirectory, finalPath) os.MkdirAll(templateDirectory, os.ModePerm) - f, err := os.OpenFile(path.Join(templateDirectory, name), os.O_CREATE|os.O_WRONLY, 0777) + f, err := os.OpenFile(path.Join(templateDirectory, name), os.O_TRUNC|os.O_CREATE|os.O_WRONLY, 0777) if err != nil { return fmt.Errorf("Could not create uncompressed file: %s", err) }