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

Commit

Permalink
Replace the cd command with the pwd option. (#85)
Browse files Browse the repository at this point in the history
  • Loading branch information
gucong3000 authored and eddiemoore committed Feb 13, 2018
1 parent b03a202 commit 19facba
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/codecov.js
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@ var upload = function(args, on_success, on_failure){
// List git files
var root = path.resolve(args.options.root || query.root || '.');
console.log('==> Building file structure');
upload += execSync('cd '+root+' && git ls-files || hg locate').toString().trim() + '\n<<<<<< network\n';
upload += execSync('git ls-files || hg locate', { cwd: root }).toString().trim() + '\n<<<<<< network\n';

// Make gcov reports
if ((args.options.disable || '').split(',').indexOf('gcov') === -1) {
Expand Down Expand Up @@ -318,9 +318,9 @@ var upload = function(args, on_success, on_failure){
// Detect .bowerrc
var bowerrc;
if(!isWindows) {
bowerrc = execSync('cd '+root+' && test -f .bowerrc && cat .bowerrc || echo ""').toString().trim();
bowerrc = execSync('test -f .bowerrc && cat .bowerrc || echo ""', { cwd: root }).toString().trim();
} else {
bowerrc = execSync('cd '+root+' && if exist .bowerrc type .bowerrc').toString().trim();
bowerrc = execSync('if exist .bowerrc type .bowerrc', { cwd: root }).toString().trim();
}
if (bowerrc) {
bowerrc = JSON.parse(bowerrc).directory;
Expand Down

0 comments on commit 19facba

Please sign in to comment.