Merge "avoid error if bazel intermediates dir already exists"

This commit is contained in:
Christopher Parsons 2021-01-20 17:41:18 +00:00 committed by Gerrit Code Review
commit 965561ce43

View file

@ -371,7 +371,11 @@ func (context *bazelContext) InvokeBazel() error {
var cqueryOutput string
var err error
err = os.Mkdir(absolutePath(context.intermediatesDir()), 0777)
intermediatesDirPath := absolutePath(context.intermediatesDir())
if _, err := os.Stat(intermediatesDirPath); os.IsNotExist(err) {
err = os.Mkdir(intermediatesDirPath, 0777)
}
if err != nil {
return err
}