Skip to content

Commit 70ff2a2

Browse files
Update compilerPath if c_cpp_properties.json exists (#11257)
1 parent c3e3bd3 commit 70ff2a2

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Extension/src/LanguageServer/configurations.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -625,6 +625,10 @@ export class CppProperties {
625625
}
626626

627627
public async updateCompilerPathIfSet(path: string): Promise<void> {
628+
if (!this.propertiesFile) {
629+
// Properties file does not exist.
630+
return;
631+
}
628632
return this.handleConfigurationEditJSONCommand(() => {
629633
this.parsePropertiesFile(); // Clear out any modifications we may have made internally.
630634
const config: Configuration | undefined = this.CurrentConfiguration;

0 commit comments

Comments
 (0)