mirror of
https://github.com/Eugeny/tabby.git
synced 2025-01-30 14:20:18 +08:00
don't offer separate wsl distros until Win 10 17763 (fixes #642)
This commit is contained in:
parent
478d715d10
commit
77c253594f
@ -6,6 +6,7 @@ import { Injectable } from '@angular/core'
|
||||
import { HostAppService, Platform } from 'terminus-core'
|
||||
|
||||
import { ShellProvider, IShell } from '../api'
|
||||
import { isWindowsBuild, WIN_BUILD_WSL_EXE_DISTRO_FLAG } from '../utils'
|
||||
|
||||
@Injectable()
|
||||
export class WSLShellProvider extends ShellProvider {
|
||||
@ -34,7 +35,7 @@ export class WSLShellProvider extends ShellProvider {
|
||||
}]
|
||||
|
||||
let lxss = await Registry.get('HKCU\\Software\\Microsoft\\Windows\\CurrentVersion\\Lxss', true)
|
||||
if (!lxss || !lxss.$values.defaultdistribution) {
|
||||
if (!lxss || !lxss.$values.defaultdistribution || !isWindowsBuild(WIN_BUILD_WSL_EXE_DISTRO_FLAG)) {
|
||||
if (await fs.exists(bashPath)) {
|
||||
return [{
|
||||
id: 'wsl',
|
||||
|
@ -2,6 +2,7 @@ import * as os from 'os'
|
||||
|
||||
export const WIN_BUILD_CONPTY_SUPPORTED = 17692
|
||||
export const WIN_BUILD_CONPTY_STABLE = 18309
|
||||
export const WIN_BUILD_WSL_EXE_DISTRO_FLAG = 17763
|
||||
|
||||
export function isWindowsBuild (build: number): boolean {
|
||||
return process.platform === 'win32' && parseFloat(os.release()) >= 10 && parseInt(os.release().split('.')[2]) >= build
|
||||
|
Loading…
Reference in New Issue
Block a user