fix: ensure the .buildpacks file exists before writing to it

This commit is contained in:
Jose Diaz-Gonzalez committed 2019-04-17 02:04:06 -04:00
1 parent 13e3950f4a
commit 322dd2246f
2 files changed
+23 -1

No files matched your search

@@ -26,7 +26,7 @@ func main() {
}
buildpacksPath := path.Join(tmpWorkDir, ".buildpacks")
file, err := os.OpenFile(buildpacksPath, os.O_RDWR|os.O_TRUNC, 0600)
file, err := os.OpenFile(buildpacksPath, os.O_RDWR|os.O_TRUNC|os.O_CREATE, 0600)
if err != nil {
common.LogFail(fmt.Sprintf("Error writing .buildpacks file: %s", err.Error()))
return