From d7b6a1f3784fa6f9d1abcc07fcec6d08e89bf294 Mon Sep 17 00:00:00 2001 From: Tzu-Lin Huang Date: Tue, 24 Apr 2018 03:24:29 +0900 Subject: [PATCH] Workaround codecov bug of miscalculation of coverage (#795) (#838) This fixes #795 (actually, workarounds it.) For detail, please refer to the issue. --- src/ls.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/ls.js b/src/ls.js index eea99c5..daebdf8 100644 --- a/src/ls.js +++ b/src/ls.js @@ -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()) {