Skip to content
This repository was archived by the owner on Dec 6, 2023. It is now read-only.

Commit

Permalink
Merge pull request #96 from percyhanna/patch-1
Browse files Browse the repository at this point in the history
Update regex to handle newer exception message
  • Loading branch information
wbyoung authored Feb 15, 2020
2 parents ccbfec8 + 34274c4 commit 5a130ba
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/plugins.js
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ exports.first = function(predicate) {
rethrowUnlessFailedRequire = function(name, e) {
var rethrow = true;
if (e.code === 'MODULE_NOT_FOUND') {
var match = e.message.match(/^cannot find module '(.*)'$/i);
var match = e.message.match(/^cannot find module '(.*)'/i);
if (match) { rethrow = (match[1] !== name); }
}
if (rethrow) { throw e; }
Expand Down

0 comments on commit 5a130ba

Please sign in to comment.