mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-01-20 06:29:53 +01:00
pluginfw/installer.js: Don't freak out users with cryptic errors, just use the error message
This commit is contained in:
parent
fa55cd4759
commit
23dd4c73e2
1 changed files with 4 additions and 1 deletions
|
@ -15,7 +15,10 @@ var withNpm = function (npmfn, final, cb) {
|
||||||
cb({progress: 0.5, message:message.msg + ": " + message.pref});
|
cb({progress: 0.5, message:message.msg + ": " + message.pref});
|
||||||
});
|
});
|
||||||
npmfn(function (er, data) {
|
npmfn(function (er, data) {
|
||||||
if (er) return cb({progress:1, error:er.code + ": " + er.path});
|
if (er) {
|
||||||
|
console.error(er);
|
||||||
|
return cb({progress:1, error: er.message});
|
||||||
|
}
|
||||||
if (!data) data = {};
|
if (!data) data = {};
|
||||||
data.progress = 1;
|
data.progress = 1;
|
||||||
data.message = "Done.";
|
data.message = "Done.";
|
||||||
|
|
Loading…
Reference in a new issue