ComposTestCase: Abort shell command if cd fails

It was only to replace ';' with '&&', but it triggers the reformatting
during the upload.

Bug: 279127811
Test: TH
Change-Id: I3e828ca1c03778db906915a5c0e208fb0ec4fb34
diff --git a/compos/tests/java/android/compos/test/ComposTestCase.java b/compos/tests/java/android/compos/test/ComposTestCase.java
index 8c7aeeb..3a09475 100644
--- a/compos/tests/java/android/compos/test/ComposTestCase.java
+++ b/compos/tests/java/android/compos/test/ComposTestCase.java
@@ -221,8 +221,11 @@
         // compos.info.signature since it's only generated by CompOS.
         // TODO(b/211458160): Remove cache-info.xml once we can plumb timestamp and isFactory of
         // APEXes to the VM.
-        return runner.run("cd " + path + "; find -type f -exec sha256sum {} \\;"
-                + "| grep -v cache-info.xml | grep -v compos.info"
-                + "| sort -k2");
+        return runner.run(
+                "cd "
+                        + path
+                        + " && find -type f -exec sha256sum {} \\;"
+                        + "| grep -v cache-info.xml | grep -v compos.info"
+                        + "| sort -k2");
     }
 }