Skip to content

Commit

Permalink
fix: cov replaced warning at win
Browse files Browse the repository at this point in the history
  • Loading branch information
atian25 committed Apr 24, 2017
1 parent 9b040b1 commit 01844db
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 6 deletions.
24 changes: 24 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<!--
Thank you for your pull request. Please review below requirements.
Bug fixes and new features should include tests and possibly benchmarks.
Contributors guide: https://github.com/eggjs/egg/blob/master/CONTRIBUTING.md
感谢您贡献代码。请确认下列 checklist 的完成情况。
Bug 修复和新功能必须包含测试,必要时请附上性能测试。
Contributors guide: https://github.com/eggjs/egg/blob/master/CONTRIBUTING.md
-->

##### Checklist
<!-- Remove items that do not apply. For completed items, change [ ] to [x]. -->

- [ ] `npm test` passes
- [ ] tests and/or benchmarks are included
- [ ] documentation is changed or added
- [ ] commit message follows commit guidelines

##### Affected core subsystem(s)
<!-- Provide affected core subsystem(s). -->


##### Description of change
<!-- Provide a description of the change below this comment. -->
6 changes: 0 additions & 6 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,6 @@ class EggBin extends Command {

// load directory
this.load(path.join(__dirname, 'lib/cmd'));

/* istanbul ignore if */
if (process.platform === 'win32') {
console.warn('`cov` is replaced with `test` at windows');
this.alias('cov', 'test');
}
}
}

Expand Down
6 changes: 6 additions & 0 deletions lib/cmd/cov.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,12 @@ class CovCommand extends Command {
}

* run(context) {
/* istanbul ignore if */
if (process.platform === 'win32') {
console.warn('`cov` is replaced with `test` at windows');
return yield super.run(context);
}

const { cwd, argv, execArgv } = context;
const tmpDir = path.join(cwd, '.tmp');
yield mkdirp(tmpDir);
Expand Down

0 comments on commit 01844db

Please sign in to comment.