diff options
author | Gareth Jones <jones258@gmail.com> | 2020-10-18 22:07:29 +0300 |
---|---|---|
committer | Ruy Adorno <ruyadorno@hotmail.com> | 2020-10-20 21:21:23 +0300 |
commit | ce4724a3835ded9a4a29d8d67323f925461155e5 (patch) | |
tree | c40268ff113b62ef1e30851f5c25f7debb8d0010 /lib/ls.js | |
parent | 89fbf733f95b3c7633877a97eb02be243ee92c6f (diff) |
fix: check `result` when determining exit code of `ls <filter>`
PR-URL: https://github.com/npm/cli/pull/1986
Credit: @G-Rath
Close: #1986
Reviewed-by: @ruyadorno
Diffstat (limited to 'lib/ls.js')
-rw-r--r-- | lib/ls.js | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -488,7 +488,7 @@ const ls = async (args) => { ) // if filtering items, should exit with error code on no results - if (!tree[_include] && args.length) { + if (result && !result[_include] && args.length) { process.exitCode = 1 } |