avoid error if bazel intermediates dir already exists
Previously, the build failed if the directory already existed, so mixed builds had to be null builds. Test: lunch aosp_flame && USE_BAZEL=1 USE_BAZEL_ANAYSIS=1 m libc && USE_BAZEL=1 USE_ANALYSIS=1 m libc Change-Id: I167cb82b3e47e9388a1ebca7daffe45f91474125
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
Reference in New Issue
Block a user