mirror of
https://github.com/Eugeny/tabby.git
synced 2025-06-09 14:00:03 +00:00
Fix the problem that the Developer Prompt for VS 2022
profile could not be loaded
This commit is contained in:
parent
fa2bbe39c4
commit
7cddcee951
@ -27,15 +27,13 @@ export class VSDevToolsProvider extends ShellProvider {
|
||||
return []
|
||||
}
|
||||
|
||||
const parentPath = path.join(process.env['programfiles(x86)'] ?? 'C:\\Program Files (x86', 'Microsoft Visual Studio')
|
||||
|
||||
try {
|
||||
await fs.stat(parentPath)
|
||||
} catch {
|
||||
return []
|
||||
}
|
||||
const x86ParentPath = path.join(process.env['programfiles(x86)'] ?? 'C:\\Program Files (x86)', 'Microsoft Visual Studio')
|
||||
const x64ParentPath = path.join(process.env['programfiles'] ?? 'C:\\Program Files', 'Microsoft Visual Studio')
|
||||
|
||||
const result: Shell[] = []
|
||||
for (const parentPath of [x86ParentPath, x64ParentPath]) {
|
||||
try {
|
||||
await fs.stat(parentPath)
|
||||
for (const version of await fs.readdir(parentPath)) {
|
||||
const bat = path.join(parentPath, version, 'Community\\Common7\\Tools\\VsDevCmd.bat')
|
||||
try {
|
||||
@ -52,6 +50,10 @@ export class VSDevToolsProvider extends ShellProvider {
|
||||
env: {},
|
||||
})
|
||||
}
|
||||
} catch (_) {
|
||||
// Ignore
|
||||
}
|
||||
}
|
||||
return result
|
||||
|
||||
// return [
|
||||
|
Loading…
x
Reference in New Issue
Block a user