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

Commit 19facba

Browse files
gucong3000eddiemoore
authored andcommitted
Replace the cd command with the pwd option. (#85)
1 parent b03a202 commit 19facba

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lib/codecov.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -283,7 +283,7 @@ var upload = function(args, on_success, on_failure){
283283
// List git files
284284
var root = path.resolve(args.options.root || query.root || '.');
285285
console.log('==> Building file structure');
286-
upload += execSync('cd '+root+' && git ls-files || hg locate').toString().trim() + '\n<<<<<< network\n';
286+
upload += execSync('git ls-files || hg locate', { cwd: root }).toString().trim() + '\n<<<<<< network\n';
287287

288288
// Make gcov reports
289289
if ((args.options.disable || '').split(',').indexOf('gcov') === -1) {
@@ -318,9 +318,9 @@ var upload = function(args, on_success, on_failure){
318318
// Detect .bowerrc
319319
var bowerrc;
320320
if(!isWindows) {
321-
bowerrc = execSync('cd '+root+' && test -f .bowerrc && cat .bowerrc || echo ""').toString().trim();
321+
bowerrc = execSync('test -f .bowerrc && cat .bowerrc || echo ""', { cwd: root }).toString().trim();
322322
} else {
323-
bowerrc = execSync('cd '+root+' && if exist .bowerrc type .bowerrc').toString().trim();
323+
bowerrc = execSync('if exist .bowerrc type .bowerrc', { cwd: root }).toString().trim();
324324
}
325325
if (bowerrc) {
326326
bowerrc = JSON.parse(bowerrc).directory;

0 commit comments

Comments
 (0)