summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Christopher Parsons <cparsons@google.com> 2022-08-12 22:33:37 +0000
committer Gerrit Code Review <noreply-gerritcodereview@google.com> 2022-08-12 22:33:37 +0000
commitd00b5629398bd4e670b45a13c220de3c1b9c021c (patch)
treeaa0f7aa50eeaae78014a4a932cd60c7e2c1cb6d2
parent7e6f5d85f9e0dc4fac36e9fb0b1cc3b9bf8ee045 (diff)
parent429f540bd049645468d740c015429b2457f02f2b (diff)
Merge "Write cquery.out even without error"
-rw-r--r--android/bazel_handler.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/android/bazel_handler.go b/android/bazel_handler.go
index 0ed973a45..a5fa04322 100644
--- a/android/bazel_handler.go
+++ b/android/bazel_handler.go
@@ -767,9 +767,9 @@ func (context *bazelContext) InvokeBazel(config Config) error {
cqueryOutput, cqueryErr, err := context.issueBazelCommand(context.paths, bazel.CqueryBuildRootRunName, cqueryCmd,
"--output=starlark", "--starlark:file="+absolutePath(cqueryFileRelpath))
if err != nil {
- _ = ioutil.WriteFile(filepath.Join(soongInjectionPath, "cquery.out"), []byte(cqueryOutput), 0666)
+ return err
}
- if err != nil {
+ if err = ioutil.WriteFile(filepath.Join(soongInjectionPath, "cquery.out"), []byte(cqueryOutput), 0666); err != nil {
return err
}