mirror of
https://github.com/Eugeny/tabby.git
synced 2025-06-08 13:30:02 +00:00
fixed #7745 - skip incorrect WSL registry entries
This commit is contained in:
parent
62d2735f86
commit
b624218feb
@ -56,7 +56,7 @@ export class WSLShellProvider extends ShellProvider {
|
|||||||
const lxss = wnr.getRegistryKey(wnr.HK.CU, lxssPath)
|
const lxss = wnr.getRegistryKey(wnr.HK.CU, lxssPath)
|
||||||
const shells: Shell[] = []
|
const shells: Shell[] = []
|
||||||
|
|
||||||
if (null != lxss && null != lxss.DefaultDistribution) {
|
if (lxss?.DefaultDistribution) {
|
||||||
const defaultDistKey = wnr.getRegistryKey(wnr.HK.CU, lxssPath + '\\' + String(lxss.DefaultDistribution.value))
|
const defaultDistKey = wnr.getRegistryKey(wnr.HK.CU, lxssPath + '\\' + String(lxss.DefaultDistribution.value))
|
||||||
if (defaultDistKey?.DistributionName) {
|
if (defaultDistKey?.DistributionName) {
|
||||||
const shell: Shell = {
|
const shell: Shell = {
|
||||||
@ -92,7 +92,7 @@ export class WSLShellProvider extends ShellProvider {
|
|||||||
}
|
}
|
||||||
for (const child of wnr.listRegistrySubkeys(wnr.HK.CU, lxssPath) as string[]) {
|
for (const child of wnr.listRegistrySubkeys(wnr.HK.CU, lxssPath) as string[]) {
|
||||||
const childKey = wnr.getRegistryKey(wnr.HK.CU, lxssPath + '\\' + child)
|
const childKey = wnr.getRegistryKey(wnr.HK.CU, lxssPath + '\\' + child)
|
||||||
if (!childKey.DistributionName) {
|
if (!childKey.DistributionName || !childKey.BasePath) {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
const wslVersion = (childKey.Flags?.value || 0) & 8 ? 2 : 1
|
const wslVersion = (childKey.Flags?.value || 0) & 8 ? 2 : 1
|
||||||
|
Loading…
x
Reference in New Issue
Block a user