From e3711743626fd572ae2c366b75667a6945da121d Mon Sep 17 00:00:00 2001 From: Sean McManus Date: Wed, 11 Mar 2026 06:07:08 -0700 Subject: [PATCH] Fix warning "Cannot find" instead of "Path is not a file" for compilerPath. --- Extension/src/LanguageServer/configurations.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Extension/src/LanguageServer/configurations.ts b/Extension/src/LanguageServer/configurations.ts index 814ccb41a..ce2fd780a 100644 --- a/Extension/src/LanguageServer/configurations.ts +++ b/Extension/src/LanguageServer/configurations.ts @@ -1672,10 +1672,10 @@ export class CppProperties { if (!isCl && compilerPathAndArgs.compilerPath) { const compilerPathMayNeedQuotes: boolean = !resolvedCompilerPath.startsWith('"') && resolvedCompilerPath.includes(" ") && compilerPathAndArgs.compilerArgsFromCommandLineInPath.length > 0; let pathExists: boolean = true; - const existsWithExeAdded: (path: string) => boolean = (path: string) => isWindows && !path.startsWith("/") && util.checkFileExistsSync(path + ".exe"); + const existsWithExeAdded: (path: string) => boolean = (path: string) => isWindows && !path.startsWith("/") && fs.existsSync(path + ".exe"); resolvedCompilerPath = compilerPathAndArgs.compilerPath; - if (!util.checkFileExistsSync(resolvedCompilerPath)) { + if (!fs.existsSync(resolvedCompilerPath)) { if (existsWithExeAdded(resolvedCompilerPath)) { resolvedCompilerPath += ".exe"; } else { @@ -1686,7 +1686,7 @@ export class CppProperties { } else if (rootUri) { // Test if it was a relative path. const absolutePath: string = rootUri.fsPath + path.sep + resolvedCompilerPath; - if (!util.checkFileExistsSync(absolutePath)) { + if (!fs.existsSync(absolutePath)) { if (existsWithExeAdded(absolutePath)) { resolvedCompilerPath = absolutePath + ".exe"; } else {