From ada583b7aa527c95d241802019421c3e9f6d9200 Mon Sep 17 00:00:00 2001 From: Yuki Hattori Date: Tue, 21 Jul 2020 07:58:45 +0900 Subject: [PATCH] Recover broken find pattern for UNIX ref: https://github.com/codecov/codecov-node/issues/184 Removing brackets from find arguments (a4cc565) has affected to the result of finding coverage files. This commit reverts brackets to get back the original search condition. Previously brackets were escaped by backslash to avoid opening sub-shell on the shell environment, but no longer need backslashes because of using `execFileSync()` that is disabled shell environment by default. --- lib/codecov.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/codecov.js b/lib/codecov.js index da8b6e52..83584ff9 100644 --- a/lib/codecov.js +++ b/lib/codecov.js @@ -20,7 +20,8 @@ var isWindows = if (!isWindows) { patterns = ( - "-type f -name '*coverage.*' " + + '-type f ( ' + + "-name '*coverage.*' " + "-or -name 'nosetests.xml' " + "-or -name 'jacoco*.xml' " + "-or -name 'clover.xml' " + @@ -32,6 +33,7 @@ if (!isWindows) { "-or -name 'gcov.info' " + "-or -name '*.gcov' " + "-or -name '*.lst' " + + ') ' + "-not -name '*.sh' " + "-not -name '*.data' " + "-not -name '*.py' " +