better error message when no packages are found

This commit is contained in:
silverwind 2018-08-25 09:43:37 +02:00
parent b89d3087d6
commit 3979c99316
Signed by: silverwind
GPG Key ID: 2E62B41C93869443

@ -121,7 +121,11 @@ for (const key of dependencyTypes) {
}
if (!Object.keys(deps).length) {
finish(new Error("No packages match the given include/exclude parameters"));
if (include || exclude) {
finish(new Error("No packages match the given include/exclude parameters"));
} else {
finish(new Error("No packages found"));
}
}
const fetch = require("make-fetch-happen");