Skip to content

Commit

Permalink
Refactor changes
Browse files Browse the repository at this point in the history
  • Loading branch information
browntarik committed Aug 9, 2024
1 parent 3d59166 commit 4f78bf9
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion Extension/src/LanguageServer/configurations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -989,12 +989,15 @@ export class CppProperties {
// However, if compileCommands are used and compilerPath is explicitly set, it's still necessary to resolve variables in it.
if (configuration.compilerPath === "${default}") {
configuration.compilerPath = settings.defaultCompilerPath ?? undefined;
configuration.compilerPathIsExplicit = settings.defaultCompilerPath === null && configuration.compilerPath === undefined;
}

if (configuration.compilerPath !== undefined) {
configuration.compilerPath = util.resolveVariables(configuration.compilerPath, env);
configuration.compilerPathIsExplicit = true;
} else if (settings.defaultCompilerPath === null) {
configuration.compilerPathIsExplicit = true;
} else {
configuration.compilerPathIsExplicit = false;
}
}

Expand Down

0 comments on commit 4f78bf9

Please sign in to comment.