From f9f04e1c2b47c43206c0a95d74329e66714da5ea Mon Sep 17 00:00:00 2001 From: Joe Becher Date: Thu, 21 May 2020 10:32:59 -0400 Subject: [PATCH] Revert "Switch from execSync to execFileSync" This reverts commit b7c9e4ea105d45e9984f597da7615eb8e477936d. --- .idea/.gitignore | 7 ------- lib/codecov.js | 15 +++++---------- 2 files changed, 5 insertions(+), 17 deletions(-) delete mode 100644 .idea/.gitignore diff --git a/.idea/.gitignore b/.idea/.gitignore deleted file mode 100644 index 03edeb0b..00000000 --- a/.idea/.gitignore +++ /dev/null @@ -1,7 +0,0 @@ -# Default ignored files -/shelf/ -/workspace.xml -# Editor-based HTTP Client requests -/httpRequests/ - -.idea/ \ No newline at end of file diff --git a/lib/codecov.js b/lib/codecov.js index f314f247..2a8cc448 100644 --- a/lib/codecov.js +++ b/lib/codecov.js @@ -4,7 +4,6 @@ var request = require('teeny-request').teenyRequest var urlgrey = require('urlgrey') var jsYaml = require('js-yaml') var walk = require('ignore-walk') -var execFileSync = require('child_process').execFileSync var execSync = require('child_process').execSync var detectProvider = require('./detect') @@ -356,7 +355,7 @@ var upload = function(args, on_success, on_failure) { console.log('==> Building file structure') try { upload += - execFileSync('git', ['ls-files', '||', 'hg', 'locate'], { cwd: root }) + execSync('git ls-files || hg locate', { cwd: root }) .toString() .trim() + '\n<<<<<< network\n' } catch (err) { @@ -415,7 +414,7 @@ var upload = function(args, on_success, on_failure) { } debug.push(gcov) console.log(' $ ' + gcov) - execFileSync(gcov) + execSync(gcov) } catch (e) { console.log(' Failed to run gcov command.') } @@ -432,9 +431,7 @@ var upload = function(args, on_success, on_failure) { .toString() .trim() } else { - bowerrc = execFileSync('if', ['exist', '.bowerrc', 'type', '.bowerrc'], { - cwd: root, - }) + bowerrc = execSync('if exist .bowerrc type .bowerrc', { cwd: root }) .toString() .trim() } @@ -478,16 +475,14 @@ var upload = function(args, on_success, on_failure) { console.log('==> Scanning for reports') var _files if (!isWindows) { - // @TODO support for a root directory - // It's not straightforward due to the nature of the find command - _files = execFileSync('find', [root, patterns, more_patterns]) + _files = execSync('find ' + root + ' ' + patterns + more_patterns) .toString() .trim() .split('\n') } else { // @TODO support for a root directory // It's not straightforward due to the nature of the dir command - _files = execFileSync('dir', [patterns, more_patterns]) + _files = execSync('dir ' + patterns + more_patterns) .toString() .trim() .split('\r\n')