-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: check
npm.config
before accessing its members
Sometimes, `npm.config` can be missing entirely, but there are several places where `npm.config.foo` is accessed blindly, resulting in these kinds of errors and stack traces: TypeError: Cannot read property 'get' of undefined at errorMessage (.../lib/utils/error-message.js:38:39) ... TypeError: Cannot read property 'loaded' of undefined at exit (.../lib/utils/error-handler.js:97:27) ... LBYL by checking `npm.config` first. Addresses a small part of #502. PR-URL: #508 Credit: @ Close: #508 Reviewed-by: @darcy Clarke
- Loading branch information
1 parent
f533d61
commit 55916b1
Showing
2 changed files
with
6 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters