File tree Expand file tree Collapse file tree 1 file changed +11
-14
lines changed
extensions/ql-vscode/src/codeql-cli Expand file tree Collapse file tree 1 file changed +11
-14
lines changed Original file line number Diff line number Diff line change @@ -1756,28 +1756,25 @@ async function logStream(stream: Readable, logger: BaseLogger): Promise<void> {
17561756 }
17571757}
17581758
1759- export function shouldDebugIdeServer ( ) {
1759+ function isEnvTrue ( name : string ) : boolean {
17601760 return (
1761- "IDE_SERVER_JAVA_DEBUG" in process . env &&
1762- process . env . IDE_SERVER_JAVA_DEBUG !== "0" &&
1763- process . env . IDE_SERVER_JAVA_DEBUG ?. toLocaleLowerCase ( ) !== "false"
1761+ name in process . env &&
1762+ process . env [ name ] !== "0" &&
1763+ // Use en-US since we expect the value to be either "false" or "FALSE", not a localized version.
1764+ process . env [ name ] ?. toLocaleLowerCase ( "en-US" ) !== "false"
17641765 ) ;
17651766}
17661767
1768+ export function shouldDebugIdeServer ( ) {
1769+ return isEnvTrue ( "IDE_SERVER_JAVA_DEBUG" ) ;
1770+ }
1771+
17671772export function shouldDebugQueryServer ( ) {
1768- return (
1769- "QUERY_SERVER_JAVA_DEBUG" in process . env &&
1770- process . env . QUERY_SERVER_JAVA_DEBUG !== "0" &&
1771- process . env . QUERY_SERVER_JAVA_DEBUG ?. toLocaleLowerCase ( ) !== "false"
1772- ) ;
1773+ return isEnvTrue ( "QUERY_SERVER_JAVA_DEBUG" ) ;
17731774}
17741775
17751776export function shouldDebugCliServer ( ) {
1776- return (
1777- "CLI_SERVER_JAVA_DEBUG" in process . env &&
1778- process . env . CLI_SERVER_JAVA_DEBUG !== "0" &&
1779- process . env . CLI_SERVER_JAVA_DEBUG ?. toLocaleLowerCase ( ) !== "false"
1780- ) ;
1777+ return isEnvTrue ( "CLI_SERVER_JAVA_DEBUG" ) ;
17811778}
17821779
17831780export class CliVersionConstraint {
You can’t perform that action at this time.
0 commit comments