mirror of
https://github.com/Eugeny/tabby.git
synced 2025-09-25 01:26:08 +00:00
don't crash on missing wsl distro flags - fixes #2744
This commit is contained in:
@@ -88,7 +88,7 @@ export class WSLShellProvider extends ShellProvider {
|
|||||||
if (!childKey.DistributionName) {
|
if (!childKey.DistributionName) {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
const wslVersion = childKey.Flags.value & 8 ? 2 : 1
|
const wslVersion = (childKey.Flags?.value || 0) & 8 ? 2 : 1
|
||||||
const name = childKey.DistributionName.value
|
const name = childKey.DistributionName.value
|
||||||
const fsBase = wslVersion === 2 ? `\\\\wsl$\\${name}` : childKey.BasePath.value as string + '\\rootfs'
|
const fsBase = wslVersion === 2 ? `\\\\wsl$\\${name}` : childKey.BasePath.value as string + '\\rootfs'
|
||||||
const slug = slugify(name, { remove: /[:.]/g })
|
const slug = slugify(name, { remove: /[:.]/g })
|
||||||
|
Reference in New Issue
Block a user