Merge "avoid error if bazel intermediates dir already exists"
This commit is contained in:
commit
965561ce43
1 changed files with 5 additions and 1 deletions
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue