Use the phan exit code directly
[lhc/web/wiklou.git] / tests / phan / bin / phan
index 07caee6..cfaf9a1 100755 (executable)
@@ -31,15 +31,15 @@ php7.0 $PHAN \
        --project-root-directory "$ROOT" \
        --config-file "$ROOT/tests/phan/config.php" \
        --output "$ROOT/tests/phan/issues/issues-${REV}" \
-       -j 4
+       "${@}"
 
-# Re-link the latest directory
+EXIT_CODE="$?"
+
+# Re-link the latest file
 rm -f "${ISSUES}/latest"
 ln -s "${RUN}" "${ISSUES}/latest"
 
 # Output any issues that were found
 cat "${RUN}"
 
-if [ $(wc -l < ${RUN}) -ne 0 ]; then
-       exit 1
-fi
+exit $EXIT_CODE