Browse Source

Fix grep logic

Tianon Gravi 7 years ago
parent
commit
0899285c36
1 changed files with 1 additions and 2 deletions
  1. 1 2
      bashbrew/travis.sh

+ 1 - 2
bashbrew/travis.sh

@@ -37,8 +37,7 @@ fi
 
 
 export BASHBREW_LIBRARY="$(dirname "$PWD")/library"
 export BASHBREW_LIBRARY="$(dirname "$PWD")/library"
 
 
-badTags="$(bashbrew list "${repos[@]}" | grep -E ':.+latest.*|:.*latest.+')"
-if [ -n "$badTags" ]; then
+if badTags="$(bashbrew list "${repos[@]}" | grep -E ':.+latest.*|:.*latest.+')" && [ -n "$badTags" ]; then
 	echo >&2
 	echo >&2
 	echo >&2 "Incorrectly 'latest' tags detected:"
 	echo >&2 "Incorrectly 'latest' tags detected:"
 	echo >&2 ' ' $badTags
 	echo >&2 ' ' $badTags