Workaround codecov bug of miscalculation of coverage (#795) (#838)

This fixes #795 (actually, workarounds it.)
For detail, please refer to the issue.
This commit is contained in:
Tzu-Lin Huang 2018-04-24 03:24:29 +09:00 committed by Nate Fischer
parent 9035b27403
commit d7b6a1f378

View File

@ -79,6 +79,10 @@ function _ls(options, paths) {
stat = options.link ? common.statFollowLinks(p) : common.statNoFollowLinks(p);
// follow links to directories by default
if (stat.isSymbolicLink()) {
/* istanbul ignore next */
// workaround for https://github.com/shelljs/shelljs/issues/795
// codecov seems to have a bug that miscalculate this block as uncovered.
// but according to nyc report this block does get covered.
try {
var _stat = common.statFollowLinks(p);
if (_stat.isDirectory()) {