From 72ed5df5a4ec25ed76808186555e012799ff5299 Mon Sep 17 00:00:00 2001 From: Christopher Chedeau Date: Tue, 27 Sep 2016 16:20:50 -0700 Subject: [PATCH] Fix total count in flow tracker (#7813) When you put the output of a bash command in a variable, it replaces the `\n` with a space. Using `ls` instead of `echo` fixes it Test Plan: Run ``` ALL_FILES=`find src -name '*.js' | grep -v umd/ | grep -v __tests__ | grep -v __mocks__` COUNT_ALL_FILES=`ls $ALL_FILES | wc -l` echo $COUNT_ALL_FILES ``` Make sure that it outputs 221 --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index e38e559bee..e2271f6e5d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -100,7 +100,7 @@ script: ./node_modules/.bin/grunt flow ALL_FILES=`find src -name '*.js' | grep -v umd/ | grep -v __tests__ | grep -v __mocks__` - COUNT_ALL_FILES=`echo $ALL_FILES | wc -l` + COUNT_ALL_FILES=`echo "$ALL_FILES" | wc -l` COUNT_WITH_FLOW=`grep '@flow' $ALL_FILES | perl -pe 's/:.+//' | wc -l` node scripts/facts-tracker/index.js \ "flow-files" "$COUNT_WITH_FLOW/$COUNT_ALL_FILES"