Skip to content

Commit 916e4f2

Browse files
committed
Warn about invalid value for CODEQL_EXTRACTOR_GO_BUILD_TRACING
1 parent 0b5df16 commit 916e4f2

File tree

3 files changed

+12
-1
lines changed

3 files changed

+12
-1
lines changed

lib/languages.js

Lines changed: 4 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/languages.js.map

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

src/languages.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,13 @@ export function parseLanguage(language: string): Language | undefined {
3737
}
3838

3939
export function isTracedLanguage(language: Language): boolean {
40+
if (process.env["CODEQL_EXTRACTOR_GO_BUILD_TRACING"] === "true") {
41+
throw new Error(
42+
"The CODEQL_EXTRACTOR_GO_BUILD_TRACING environment variable is set to an invalid value. " +
43+
"Please set it to 'on' instead to enable Go build tracing."
44+
);
45+
}
46+
4047
return (
4148
["cpp", "java", "csharp", "swift"].includes(language) ||
4249
(process.env["CODEQL_EXTRACTOR_GO_BUILD_TRACING"] === "on" &&

0 commit comments

Comments
 (0)