Skip to content
This repository has been archived by the owner on Jan 10, 2023. It is now read-only.

Commit

Permalink
Revert "Switch from execSync to execFileSync"
Browse files Browse the repository at this point in the history
This reverts commit b7c9e4e.
  • Loading branch information
drazisil committed May 21, 2020
1 parent b7c9e4e commit f9f04e1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 17 deletions.
7 changes: 0 additions & 7 deletions .idea/.gitignore

This file was deleted.

15 changes: 5 additions & 10 deletions lib/codecov.js
Expand Up @@ -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')
Expand Down Expand Up @@ -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) {
Expand Down Expand Up @@ -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.')
}
Expand All @@ -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()
}
Expand Down Expand Up @@ -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')
Expand Down

0 comments on commit f9f04e1

Please sign in to comment.