@@ -220,7 +220,9 @@ export class CppProperties {
220220 if ( process . platform === 'darwin' ) {
221221 this . configurationJson . configurations [ this . CurrentConfiguration ] . macFrameworkPath = this . defaultFrameworks ;
222222 }
223- this . configurationJson . configurations [ this . CurrentConfiguration ] . compilerPath = this . defaultCompilerPath ;
223+ if ( this . defaultCompilerPath ) {
224+ this . configurationJson . configurations [ this . CurrentConfiguration ] . compilerPath = this . defaultCompilerPath ;
225+ }
224226 if ( this . defaultCStandard ) {
225227 this . configurationJson . configurations [ this . CurrentConfiguration ] . cStandard = this . defaultCStandard ;
226228 }
@@ -475,15 +477,16 @@ export class CppProperties {
475477
476478 // Update the compilerPath, cStandard, and cppStandard with the default if they're missing.
477479 let config : Configuration = this . configurationJson . configurations [ this . CurrentConfiguration ] ;
478- if ( config . compilerPath === undefined ) {
480+ // Don't set the default if compileCommands exist, until it is fixed to have the correct value.
481+ if ( config . compilerPath === undefined && this . defaultCompilerPath && ! config . compileCommands ) {
479482 config . compilerPath = this . defaultCompilerPath ;
480483 dirty = true ;
481484 }
482- if ( ! config . cStandard ) {
485+ if ( ! config . cStandard && this . defaultCStandard ) {
483486 config . cStandard = this . defaultCStandard ;
484487 dirty = true ;
485488 }
486- if ( ! config . cppStandard ) {
489+ if ( ! config . cppStandard && this . defaultCppStandard ) {
487490 config . cppStandard = this . defaultCppStandard ;
488491 dirty = true ;
489492 }
0 commit comments