Skip to content

Commit a4cc565

Browse files
committed
I think this fixes linux and macos...
1 parent 43904fc commit a4cc565

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

lib/codecov.js

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ var isWindows =
1818
process.platform.match(/win32/) || process.platform.match(/win64/)
1919

2020
if (!isWindows) {
21-
patterns =
22-
"-type f \\( -name '*coverage.*' " +
21+
patterns = (
22+
"-type f -name '*coverage.*' " +
2323
"-or -name 'nosetests.xml' " +
2424
"-or -name 'jacoco*.xml' " +
2525
"-or -name 'clover.xml' " +
@@ -30,7 +30,7 @@ if (!isWindows) {
3030
"-or -name '*.lcov' " +
3131
"-or -name 'gcov.info' " +
3232
"-or -name '*.gcov' " +
33-
"-or -name '*.lst' \\) " +
33+
"-or -name '*.lst' " +
3434
"-not -name '*.sh' " +
3535
"-not -name '*.data' " +
3636
"-not -name '*.py' " +
@@ -77,6 +77,7 @@ if (!isWindows) {
7777
"-not -path '*/$bower_components/*' " +
7878
"-not -path '*/node_modules/*' " +
7979
"-not -path '*/conftest_*.c.gcov'"
80+
).split(' ')
8081
} else {
8182
patterns =
8283
'/a-d /b /s *coverage.* ' +
@@ -473,10 +474,13 @@ var upload = function(args, on_success, on_failure) {
473474
} else if ((args.options.disable || '').split(',').indexOf('search') === -1) {
474475
console.log('==> Scanning for reports')
475476
var _files
477+
var _findArgs
476478
if (!isWindows) {
477479
// @TODO support for a root directory
478480
// It's not straightforward due to the nature of the find command
479-
_files = execFileSync('find', [root, patterns, more_patterns])
481+
// _files = execFileSync('find', [root, patterns, more_patterns])
482+
_findArgs = [root].concat(patterns)
483+
_files = execFileSync('find', _findArgs)
480484
.toString()
481485
.trim()
482486
.split('\n')

0 commit comments

Comments
 (0)