Skip to content

Commit 1462b0d

Browse files
authored
Normalize messages for bad paths (#12904)
1 parent e45dbce commit 1462b0d

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

Diff for: Extension/src/LanguageServer/configurations.ts

+4-4
Original file line numberDiff line numberDiff line change
@@ -1948,7 +1948,7 @@ export class CppProperties {
19481948
compilerPath = checkPathExists.path;
19491949
}
19501950
if (!compilerPathExists) {
1951-
compilerMessage = localize('cannot.find2', "Cannot find \"{0}\".", compilerPath);
1951+
compilerMessage = localize('cannot.find', "Cannot find: {0}", compilerPath);
19521952
newSquiggleMetrics.PathNonExistent++;
19531953
}
19541954
if (compilerMessage) {
@@ -1975,7 +1975,7 @@ export class CppProperties {
19751975
dotConfigPath = checkPathExists.path;
19761976
}
19771977
if (!dotConfigPathExists) {
1978-
dotConfigMessage = localize('cannot.find2', "Cannot find \"{0}\".", dotConfigPath);
1978+
dotConfigMessage = localize('cannot.find', "Cannot find: {0}", dotConfigPath);
19791979
newSquiggleMetrics.PathNonExistent++;
19801980
} else if (dotConfigPath && !util.checkFileExistsSync(dotConfigPath)) {
19811981
dotConfigMessage = localize("path.is.not.a.file", "Path is not a file: {0}", dotConfigPath);
@@ -2083,7 +2083,7 @@ export class CppProperties {
20832083
} else {
20842084
badPath = `"${expandedPaths[0]}"`;
20852085
}
2086-
message = localize('cannot.find2', "Cannot find {0}", badPath);
2086+
message = localize('cannot.find', "Cannot find: {0}", badPath);
20872087
newSquiggleMetrics.PathNonExistent++;
20882088
} else {
20892089
// Check for file versus path mismatches.
@@ -2141,7 +2141,7 @@ export class CppProperties {
21412141
endOffset = curOffset + curMatch.length;
21422142
let message: string;
21432143
if (!pathExists) {
2144-
message = localize('cannot.find2', "Cannot find \"{0}\".", expandedPaths[0]);
2144+
message = localize('cannot.find', "Cannot find: {0}", expandedPaths[0]);
21452145
newSquiggleMetrics.PathNonExistent++;
21462146
const diagnostic: vscode.Diagnostic = new vscode.Diagnostic(
21472147
new vscode.Range(document.positionAt(envTextStartOffSet + curOffset),

0 commit comments

Comments
 (0)