Fixed errors with overwritten updated templates

dev
Ice3man543 2020-08-27 18:08:12 +05:30
parent 201a3a6cde
commit 90354f26a0
1 changed files with 1 additions and 1 deletions

View File

@ -311,7 +311,7 @@ func (r *Runner) downloadReleaseAndUnzip(downloadURL string) error {
templateDirectory := path.Join(r.templatesConfig.TemplatesDirectory, finalPath) templateDirectory := path.Join(r.templatesConfig.TemplatesDirectory, finalPath)
os.MkdirAll(templateDirectory, os.ModePerm) 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 { if err != nil {
return fmt.Errorf("Could not create uncompressed file: %s", err) return fmt.Errorf("Could not create uncompressed file: %s", err)
} }