From ff8a1ef32a9435e0e681dab36b026e364736281e Mon Sep 17 00:00:00 2001 From: Ben Newman Date: Tue, 13 Feb 2018 13:43:08 -0500 Subject: [PATCH] Better error when running test-packages for nonexistent packages. --- tools/cli/commands.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/cli/commands.js b/tools/cli/commands.js index 85b6174669..2ae436df5c 100644 --- a/tools/cli/commands.js +++ b/tools/cli/commands.js @@ -1881,7 +1881,8 @@ var getTestPackageNames = function (projectContext, packageNames) { version = projectContext.localCatalog.getVersionBySourceRoot( files.pathResolve(p)); if (! version) { - throw Error("should have been caught when initializing catalog?"); + buildmessage.error("Package not found in local catalog"); + return; } if (version.testName) { testPackages.push(version.testName);