Skip to content

Commit

Permalink
Do not reject npm error
Browse files Browse the repository at this point in the history
  • Loading branch information
caoyangs committed Nov 18, 2016
1 parent 57fd73a commit be57d16
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions server/component-api/check-dependencies.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,9 @@ const getDepLatest = (dep, version, isDev) => {
return new Promise((resolve, reject) => {

execFile("bash", [Path.join(__dirname, "../../scripts/info-module.sh"), dep], (err, stdout, stderr) => {
if (err) {
console.log("error getting module info", err);
return reject(err);
}

if (stderr) {
console.error("module info stderr", stderr);
return reject(new Error(stderr));
if (err || stderr) {
console.log("error getting module info", err || stderr);
return resolve({});
}

const m = stdout.match(/latest:\s'([\d\.]+)'/);
Expand Down

0 comments on commit be57d16

Please sign in to comment.