Skip to content

Commit 98b8e51

Browse files
committed
Always check whether config file exists
And emit a warning if it doesn't
1 parent d7bad7d commit 98b8e51

2 files changed

Lines changed: 14 additions & 2 deletions

File tree

‎lib/entry-points.js‎

Lines changed: 7 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎src/codeql.ts‎

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -927,7 +927,13 @@ async function getCodeQLForCmd(
927927
let configPath: string | undefined =
928928
getGeneratedCodeScanningConfigPath(config);
929929

930-
if (diagnosticDir !== undefined && !fs.existsSync(configPath)) {
930+
if (!fs.existsSync(configPath)) {
931+
logger.warning(
932+
[
933+
`Expected a configuration file at '${configPath}', which does not exist.`,
934+
"Continuing with diagnostics export anyway, without a configuration file.",
935+
].join(" "),
936+
);
931937
configPath = undefined;
932938
}
933939

0 commit comments

Comments
 (0)