Skip to content

Commit

Permalink
Warn about invalid value for CODEQL_EXTRACTOR_GO_BUILD_TRACING
Browse files Browse the repository at this point in the history
  • Loading branch information
henrymercer committed Aug 23, 2022
1 parent 0b5df16 commit 916e4f2
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 1 deletion.
4 changes: 4 additions & 0 deletions lib/languages.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion lib/languages.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions src/languages.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,13 @@ export function parseLanguage(language: string): Language | undefined {
}

export function isTracedLanguage(language: Language): boolean {
if (process.env["CODEQL_EXTRACTOR_GO_BUILD_TRACING"] === "true") {
throw new Error(
"The CODEQL_EXTRACTOR_GO_BUILD_TRACING environment variable is set to an invalid value. " +
"Please set it to 'on' instead to enable Go build tracing."
);
}

return (
["cpp", "java", "csharp", "swift"].includes(language) ||
(process.env["CODEQL_EXTRACTOR_GO_BUILD_TRACING"] === "on" &&
Expand Down

0 comments on commit 916e4f2

Please sign in to comment.