diff --git a/tools/commands-packages.js b/tools/commands-packages.js index 4a8972bbe0..51a33582e2 100644 --- a/tools/commands-packages.js +++ b/tools/commands-packages.js @@ -1948,6 +1948,17 @@ main.registerCommand({ upgradePackages = options.args; } + // Check that every requested package exists + var unknownPackages = 0; + _.each(upgradePackages, function (packageName) { + if (! _.has(versions, packageName)) { + Console.error(packageName + ': package is not in the project'); + unknownPackages++; + } + }); + if (unknownPackages) + return 1; + // Call the constraint solver. This should not fail, since we are not adding // any constraints that we didn't have before. var newVersions;