Skip to content

Commit

Permalink
Recover broken find pattern for UNIX
Browse files Browse the repository at this point in the history
ref: codecov#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.
  • Loading branch information
yhatt committed Jul 20, 2020
1 parent c0711c6 commit ada583b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/codecov.js
Original file line number Diff line number Diff line change
Expand Up @@ -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' " +
Expand All @@ -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' " +
Expand Down

1 comment on commit ada583b

@yhatt
Copy link
Owner Author

@yhatt yhatt commented on ada583b Jul 20, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

UPDATE: This change seems to make no effects to the reported error X Failed to read file at. I'm digging now for the root cause.

Please sign in to comment.