소스 검색

Fix grep logic

Tianon Gravi 7 년 전
부모
커밋
0899285c36
1개의 변경된 파일1개의 추가작업 그리고 2개의 파일을 삭제
  1. 1 2
      bashbrew/travis.sh

+ 1 - 2
bashbrew/travis.sh

@@ -37,8 +37,7 @@ fi
 
 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 "Incorrectly 'latest' tags detected:"
 	echo >&2 ' ' $badTags