diff --git a/.travis/check_empty_specs b/.travis/check_empty_specs
index 1423d71f7..568c2baa6 100755
--- a/.travis/check_empty_specs
+++ b/.travis/check_empty_specs
@@ -1,3 +1,7 @@
 #!/usr/bin/env bash
 
-["$(ls _specs)" ] || exit 0
+if [ -n "$(find "_specs" -maxdepth 0 -type d -empty 2>/dev/null)" ]; then
+    exit 0
+else
+    exit 1
+fi