Packaging: Address review comments
1. Better malformed data guard for PackDownloadOutput 2. Fix Packs type 3. Remove TODO in init-action
This commit is contained in:
parent
d87945e9fd
commit
1cc5f1d5dd
14 changed files with 39 additions and 69 deletions
2
lib/config-utils.js
generated
2
lib/config-utils.js
generated
|
|
@ -627,7 +627,7 @@ async function initConfig(languagesInput, queriesInput, configFile, dbLocation,
|
|||
for (const language of config.languages) {
|
||||
const hasBuiltinQueries = ((_a = config.queries[language]) === null || _a === void 0 ? void 0 : _a.builtin.length) > 0;
|
||||
const hasCustomQueries = ((_b = config.queries[language]) === null || _b === void 0 ? void 0 : _b.custom.length) > 0;
|
||||
const hasPacks = ((_c = config.packs[language]) === null || _c === void 0 ? void 0 : _c.length) > 0;
|
||||
const hasPacks = (((_c = config.packs[language]) === null || _c === void 0 ? void 0 : _c.length) || 0) > 0;
|
||||
if (!hasPacks && !hasBuiltinQueries && !hasCustomQueries) {
|
||||
throw new Error(`Did not detect any queries to run for ${language}. ` +
|
||||
"Please make sure that the default queries are enabled, or you are specifying queries to run.");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue