Snap for 6435660 from ec5085e613aefc6f3e4037823bd67d9caed804f0 to sdk-release
Change-Id: I6422ef4d826857ac71665e5326d02cac7ea47599
diff --git a/bootstrap/command.go b/bootstrap/command.go
index 1e3b2fe..cbbd32d 100644
--- a/bootstrap/command.go
+++ b/bootstrap/command.go
@@ -183,6 +183,12 @@
var f *os.File
var buf *bufio.Writer
+ if emptyNinjaFile {
+ if err := ioutil.WriteFile(absolutePath(outFile), []byte(nil), outFilePermissions); err != nil {
+ fatalf("error writing empty Ninja file: %s", err)
+ }
+ }
+
if stage != StageMain || !emptyNinjaFile {
f, err = os.OpenFile(absolutePath(outFile), os.O_WRONLY|os.O_CREATE|os.O_TRUNC, outFilePermissions)
if err != nil {