Skip to content
This repository has been archived by the owner on Oct 26, 2019. It is now read-only.

Commit

Permalink
Reject errors instaed of throwing them.
Browse files Browse the repository at this point in the history
  • Loading branch information
Blaine Schmeisser committed Jan 9, 2017
1 parent 5c39e9c commit 9589e98
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/lib/npmInstall.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@ const npmInstall = (name, packagePath) => {
})
return new Promise((resolve, reject) => {
npm.load({}, (npmErr) => {
if (npmErr) throw npmErr
if (npmErr) return reject(npmErr)
npm.commands.install(packagePath, packages, (err) => {
if (err) throw err
if (err) return reject(err)
installStatus.set(name, 'installed').then(resolve)
})
})
Expand Down
6 changes: 6 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
## Next

### Bugs

* Better handle npm install exceptions.

## 0.3.0

### Features
Expand Down

0 comments on commit 9589e98

Please sign in to comment.