Skip to content

Commit

Permalink
fix: dynamic coverage command
Browse files Browse the repository at this point in the history
  • Loading branch information
AVVS committed Oct 21, 2018
1 parent 3dcda50 commit d675501
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions bin/cmds/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,9 @@ exports.builder = yargs => (
})
.option('coverage', {
describe: 'whether to upload coverage or not',
boolean: true,
default: !!process.env.CI,
default: process.env.CI === 'true'
? './node_modules/.bin/codecov'
: false,
})
.option('root', {
describe: 'binary root path on the tester',
Expand Down
2 changes: 1 addition & 1 deletion bin/cmds/test_cmds/run.js
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,6 @@ exports.handler = async (argv) => {
// upload codecoverage report
if (argv.coverage) {
// this is to avoid exposing token
await echoAndExec('./node_modules/.bin/codecov > /dev/null &2>1');
await echoAndExec(`${argv.coverage} > /dev/null 2>1`);
}
};

0 comments on commit d675501

Please sign in to comment.