Explorar el Código

test: display unused output if unused source found

unused will non-zero exit if it finds unused source which causes test's
set -e to close out of the test script
Anthony Romano hace 10 años
padre
commit
2113b77635
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1 1
      test

+ 1 - 1
test

@@ -134,7 +134,7 @@ function fmt_tests {
 	if which unused >/dev/null; then
 	if which unused >/dev/null; then
 		echo "unused is installed..."
 		echo "unused is installed..."
 		for path in $GOSIMPLE_UNUSED_PATHS; do
 		for path in $GOSIMPLE_UNUSED_PATHS; do
-			unusedResult=$(unused  $REPO_PATH/${path})
+			unusedResult=`unused $REPO_PATH/${path} || true`
 			if [ -n "${unusedResult}" ]; then
 			if [ -n "${unusedResult}" ]; then
 				echo -e "unused checking ${path} failed:\n${unusedResult}"
 				echo -e "unused checking ${path} failed:\n${unusedResult}"
 				exit 255
 				exit 255