Merge main into update-actions-github.

This commit is contained in:
Chris Gavin
2020-09-21 15:25:08 +01:00
19 changed files with 81 additions and 46 deletions

View File

@@ -875,28 +875,28 @@ async function loadConfig(
if (!(parsedYAML[PATHS_IGNORE_PROPERTY] instanceof Array)) {
throw new Error(getPathsIgnoreInvalid(configFile));
}
parsedYAML[PATHS_IGNORE_PROPERTY]!.forEach((path) => {
for (const path of parsedYAML[PATHS_IGNORE_PROPERTY]!) {
if (typeof path !== "string" || path === "") {
throw new Error(getPathsIgnoreInvalid(configFile));
}
pathsIgnore.push(
validateAndSanitisePath(path, PATHS_IGNORE_PROPERTY, configFile, logger)
);
});
}
}
if (PATHS_PROPERTY in parsedYAML) {
if (!(parsedYAML[PATHS_PROPERTY] instanceof Array)) {
throw new Error(getPathsInvalid(configFile));
}
parsedYAML[PATHS_PROPERTY]!.forEach((path) => {
for (const path of parsedYAML[PATHS_PROPERTY]!) {
if (typeof path !== "string" || path === "") {
throw new Error(getPathsInvalid(configFile));
}
paths.push(
validateAndSanitisePath(path, PATHS_PROPERTY, configFile, logger)
);
});
}
}
// The list of queries should not be empty for any language. If it is then