Warn when enabling ConPTY on older insider builds (fixes #609, fixes #594)

This commit is contained in:
Eugene Pankov 2019-02-09 17:44:17 +01:00
parent 6f99e6c14b
commit 413ca70729
3 changed files with 9 additions and 1 deletions

View File

@ -25,6 +25,9 @@ h3.mb-3 Shell
(ngModelChange)='config.save()'
)
.alert.alert-info.d-flex.align-items-center(*ngIf='config.store.terminal.useConPTY && isConPTYAvailable && !isConPTYStable')
.mr-auto Windows 10 build 18309 or above is recommended for ConPTY
.alert.alert-info.d-flex.align-items-center(*ngIf='config.store.terminal.shell.startsWith("wsl") && (config.store.terminal.frontend != "hterm" || !config.store.terminal.useConPTY)')
.mr-auto WSL terminal only supports TrueColor with ConPTY and the hterm frontend

View File

@ -1,3 +1,4 @@
import * as os from 'os'
import { Component } from '@angular/core'
import { NgbModal } from '@ng-bootstrap/ng-bootstrap'
import { Subscription } from 'rxjs'
@ -15,6 +16,7 @@ export class ShellSettingsTabComponent {
profiles: Profile[] = []
Platform = Platform
isConPTYAvailable: boolean
isConPTYStable: boolean
private configSubscription: Subscription
constructor (
@ -31,6 +33,9 @@ export class ShellSettingsTabComponent {
})
this.reload()
this.isConPTYAvailable = uac.isAvailable
this.isConPTYStable = hostApp.platform === Platform.Windows
&& parseFloat(os.release()) >= 10
&& parseInt(os.release().split('.')[2]) >= 18309
}
async ngOnInit () {

View File

@ -118,7 +118,7 @@ export class Session extends BaseSession {
rows: options.height || 30,
cwd,
env: env,
experimentalUseConpty: this.config.store.terminal.useConPTY,
experimentalUseConpty: this.config.store.terminal.useConPTY && 1,
})
this.guessedCWD = cwd