Skip to content
This repository has been archived by the owner on Aug 11, 2022. It is now read-only.

Commit

Permalink
Fix the regexp (broken 2 commits back)
Browse files Browse the repository at this point in the history
  • Loading branch information
isaacs committed Oct 29, 2010
1 parent 3eeb4fa commit 52f0171
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/utils/error-handler.js
Expand Up @@ -24,9 +24,9 @@ function errorHandler (er) {
log.error(er)
if (!(er instanceof Error)) return exit(1)
if (!er.errno) {
var m = er.message.match(/^E[A-Z]+/)
var m = er.message.match(/^(?:Error: )?(E[A-Z]+)/)
if (m) {
m = m[0]
m = m[1]
if (!constants[m] && !npm[m]) constants[m] = {}
er.errno = npm[m] || constants[m]
}
Expand Down

0 comments on commit 52f0171

Please sign in to comment.