aboutsummaryrefslogtreecommitdiff
path: root/bin/common
diff options
context:
space:
mode:
Diffstat (limited to 'bin/common')
-rwxr-xr-xbin/common3
1 files changed, 2 insertions, 1 deletions
diff --git a/bin/common b/bin/common
index 5b1dd177f..0a084c8a6 100755
--- a/bin/common
+++ b/bin/common
@@ -122,7 +122,8 @@ function check_jar {
# Usage:
# check_jar "name" "path/to/package.jar" "sources/dir" 'lambda to exec on failure'
local new_files="$(find "$DOTTY_ROOT/$3" \( -iname "*.scala" -o -iname "*.java" \) -newer "$2")"
- if [ ! -z "$new_files" ]; then
+ # If the find failed, or if it found new files...
+ if [ "$?" -ne 0 ] || [ ! -z "$new_files" ]; then
printf "New files detected in $1, rebuilding..."
rm "$2"
eval "$4"