diff options
author | Colin Cross <ccross@android.com> | 2019-01-14 16:41:18 -0800 |
---|---|---|
committer | Colin Cross <ccross@android.com> | 2019-01-14 16:41:18 -0800 |
commit | bdaef22ff44c33498aa65f999c9274d7dcd883f0 (patch) | |
tree | 41e542d95573ea7d02a294426d1dd5ab7910dfe7 | |
parent | 657e75933ff3c5def222d732b233409c2c0efeae (diff) | |
download | guice-bdaef22ff44c33498aa65f999c9274d7dcd883f0.tar.gz |
Exit on failure in genrule for loop
Bash does not exit early on failures in a for loop, and it returns
the exit code of the last time through the loop. Exit explicitly
on failures in the loop.
Bug: 122712680
Test: m checkbuild
Change-Id: I19de5cec09ca467f73e6a8a0abe0fc02bc17fa64
-rw-r--r-- | Android.bp | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -85,7 +85,7 @@ genrule { ], cmd: "for src in $(in); do " + " mkdir -p $$(dirname $(genDir)/$${src}) && " + - " $(location guice_munge) -DNO_AOP $${src} > $(genDir)/$${src}; " + + " $(location guice_munge) -DNO_AOP $${src} > $(genDir)/$${src} || exit 1; " + " done && " + " $(location soong_zip) -o $(out) -C $(genDir) -D $(genDir)", } |