Skip to content

Commit 93dc373

Browse files
authored
Fix an unstrusted compilerPath being used without a c_cpp_properties.json. (#10440)
1 parent 6f2714b commit 93dc373

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Extension/src/LanguageServer/configurations.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -296,7 +296,7 @@ export class CppProperties {
296296
this.handleConfigurationChange();
297297
}
298298
public set CompilerDefaults(compilerDefaults: CompilerDefaults) {
299-
this.defaultCompilerPath = compilerDefaults.compilerPath;
299+
this.defaultCompilerPath = compilerDefaults.trustedCompilerFound ? compilerDefaults.compilerPath : null;
300300
this.knownCompilers = compilerDefaults.knownCompilers;
301301
this.defaultCStandard = compilerDefaults.cStandard;
302302
this.defaultCppStandard = compilerDefaults.cppStandard;

0 commit comments

Comments
 (0)