Ensure UI is able to display correct not found versus found status (#445)

* ensure that we can find exe's for the UI

* possible fix

* typing fix
This commit is contained in:
Garrett Campbell 2023-03-27 14:14:52 -04:00 коммит произвёл GitHub
Родитель fcee39d2aa
Коммит 5b4d318518
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
3 изменённых файлов: 7 добавлений и 6 удалений

Просмотреть файл

@ -744,7 +744,7 @@
"devDependencies": {
"@types/mocha": "^9.0.0",
"@types/node": "^10.17.17",
"@types/vscode": "^1.76.0",
"@types/vscode": "^1.74.0",
"tslint": "^5.20.1",
"tslint-microsoft-contrib": "^6.2.0",
"tslint-no-unused-expression-chai": "^0.1.4",

Просмотреть файл

@ -305,12 +305,13 @@ export class ProjectOutlineProvider implements vscode.TreeDataProvider<BaseNode>
if (!pathInSettings) {
return `${kind}: [Unset]`;
}
const pathBase: string | undefined = (searchInPath && path.parse(pathInSettings).dir === "") ? path.parse(pathInSettings).base : undefined;
const pathInSettingsToTest: string | undefined = process.platform === "win32" && !pathInSettings?.endsWith(".exe") && kind === "Make" ? pathInSettings?.concat(".exe") : pathInSettings;
const pathBase: string | undefined = (searchInPath && path.parse(pathInSettingsToTest).dir === "") ? path.parse(pathInSettingsToTest).base : undefined;
const pathInEnv: string | undefined = pathBase ? (path.join(util.toolPathInEnv(pathBase) || "", pathBase)) : undefined;
const finalPath: string = pathInEnv || pathInSettings;
const finalPath: string = pathInEnv || pathInSettingsToTest;
return (!util.checkFileExistsSync(finalPath) ? `${kind} (not found)` : `${kind}`) + `: [${makeRelative ? util.makeRelPath(finalPath, util.getWorkspaceRoot()) : finalPath}]`;
}
}
async update(configuration: string | undefined,
buildTarget: string | undefined,

Просмотреть файл

@ -231,7 +231,7 @@
resolved "https://registry.yarnpkg.com/@types/node/-/node-10.17.60.tgz#35f3d6213daed95da7f0f73e75bcc6980e90597b"
integrity sha512-F0KIgDJfy2nA3zMLmWGKxcH2ZVEtCZXHHdOQs2gSaQ27+lNeEfGxzkIw90aXswATX7AZ33tahPbzy6KAfUreVw==
"@types/vscode@^1.76.0":
"@types/vscode@^1.74.0":
version "1.76.0"
resolved "https://registry.yarnpkg.com/@types/vscode/-/vscode-1.76.0.tgz#967c0fbe09921818bbf201f1cbcb81b981c6249c"
integrity sha512-CQcY3+Fe5hNewHnOEAVYj4dd1do/QHliXaknAEYSXx2KEHUzFibDZSKptCon+HPgK55xx20pR+PBJjf0MomnBA==