1
0
mirror of https://github.com/adobe/brackets.git synced 2024-11-20 09:53:00 +01:00

Fix the bug where errors during installation of a local .zip file wer… (#12702)

* Fix the bug where errors during installation of a local .zip file were always shown as "Unknown internal error"

* Show all error messages we have, not just one

* Add new String for error MISSING_PACKAGE_JSON
This commit is contained in:
Marcel Gerber 2016-08-22 22:05:27 +02:00 committed by Pete Nykänen
parent 9f0825dd08
commit 4be34b641c
2 changed files with 2 additions and 1 deletions

View File

@ -252,7 +252,7 @@ define(function (require, exports, module) {
// new install or an update.
Package.validate(path, { requirePackageJSON: true }).done(function (info) {
if (info.errors.length) {
result.reject(Package.formatError(info.errors));
result.reject(info.errors.map(Package.formatError).join(" "));
return;
}

View File

@ -503,6 +503,7 @@ define({
"VIEW_TRUNCATED_DESCRIPTION" : "View truncated description",
// These must match the error codes in ExtensionsDomain.Errors.* :
"INVALID_ZIP_FILE" : "The downloaded content is not a valid zip file.",
"MISSING_PACKAGE_JSON" : "The package has no package.json file.",
"INVALID_PACKAGE_JSON" : "The package.json file is not valid (error was: {0}).",
"MISSING_PACKAGE_NAME" : "The package.json file doesn't specify a package name.",
"BAD_PACKAGE_NAME" : "{0} is an invalid package name.",