Better error when running test-packages for nonexistent packages.

This commit is contained in:
Ben Newman
2018-02-13 13:43:08 -05:00
parent 8b9517344a
commit ff8a1ef32a

View File

@@ -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);