From 1bb897bf4c4ce32494f2d4060b26528aa02292aa Mon Sep 17 00:00:00 2001 From: Slava Kim Date: Mon, 20 Oct 2014 15:47:29 -0700 Subject: [PATCH] Give feedback on updating packages not in the project --- tools/commands-packages.js | 11 +++++++++++ 1 file changed, 11 insertions(+) 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;