Skip to content

Commit

Permalink
Fewer logs.
Browse files Browse the repository at this point in the history
  • Loading branch information
helly25 committed Jul 7, 2024
1 parent a763579 commit 3be0fa8
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -293,27 +293,24 @@ class ConfigData {
compileCommandsJson(): string {
let compileCommandsJsonDefault = "${workspaceFolder}/compile_commands.json";
let compileCommandsJson = this.config.get("compile_commands", compileCommandsJsonDefault);
log(DEBUG, "Got compileCommandsJson = '" + compileCommandsJson + "'.");
let isDefault = compileCommandsJson === compileCommandsJsonDefault;
log(DEBUG, "IsDefault: " + isDefault);
compileCommandsJson = this.replaceWorkspaceVars(compileCommandsJson);
try {
fs.statSync(compileCommandsJson);
log(DEBUG, "Using compileCommandsJson = '" + compileCommandsJson + "'.");
}
catch (err) {
if (isDefault) {
try {
let test = this.replaceWorkspaceVars("${workspaceFolder}/build/compile_commands.json");
fs.statSync(test);
compileCommandsJson = test;
log(DEBUG, "Using alternative compileCommandsJson = '" + compileCommandsJson + "'.");
}
catch (err) {
// Ignore, caught later.
}
}
}
log(DEBUG, "Using compileCommandsJson = '" + compileCommandsJson + "'.");
return compileCommandsJson;
}

Expand Down

0 comments on commit 3be0fa8

Please sign in to comment.