提交 4e977c57 编写于 作者: D Daniel Imms

Update node-pty, enable conpty for Windows 18309+

Fixes #66158
上级 9969ff28
...@@ -283,9 +283,9 @@ configurationRegistry.registerConfiguration({ ...@@ -283,9 +283,9 @@ configurationRegistry.registerConfiguration({
default: 'inherited' default: 'inherited'
}, },
'terminal.integrated.windowsEnableConpty': { 'terminal.integrated.windowsEnableConpty': {
description: nls.localize('terminal.integrated.windowsEnableConpty', "Whether to use ConPTY for Windows terminal process communication (requires Windows 10 build number 17692+). Winpty will be used if this is false."), description: nls.localize('terminal.integrated.windowsEnableConpty', "Whether to use ConPTY for Windows terminal process communication (requires Windows 10 build number 18309+). Winpty will be used if this is false."),
type: 'boolean', type: 'boolean',
default: false default: true
} }
} }
}); });
......
...@@ -47,13 +47,14 @@ export class TerminalProcess implements ITerminalChildProcess, IDisposable { ...@@ -47,13 +47,14 @@ export class TerminalProcess implements ITerminalChildProcess, IDisposable {
shellName = 'xterm-256color'; shellName = 'xterm-256color';
} }
const useConpty = windowsEnableConpty && process.platform === 'win32' && this._getWindowsBuildNumber() >= 18309;
const options: pty.IPtyForkOptions = { const options: pty.IPtyForkOptions = {
name: shellName, name: shellName,
cwd, cwd,
env, env,
cols, cols,
rows, rows,
experimentalUseConpty: windowsEnableConpty experimentalUseConpty: useConpty
}; };
try { try {
...@@ -101,6 +102,15 @@ export class TerminalProcess implements ITerminalChildProcess, IDisposable { ...@@ -101,6 +102,15 @@ export class TerminalProcess implements ITerminalChildProcess, IDisposable {
this._onProcessTitleChanged.dispose(); this._onProcessTitleChanged.dispose();
} }
private _getWindowsBuildNumber(): number {
const osVersion = (/(\d+)\.(\d+)\.(\d+)/g).exec(os.release());
let buildNumber: number = 0;
if (osVersion && osVersion.length === 4) {
buildNumber = parseInt(osVersion[3]);
}
return buildNumber;
}
private _setupTitlePolling() { private _setupTitlePolling() {
// Send initial timeout async to give event listeners a chance to init // Send initial timeout async to give event listeners a chance to init
setTimeout(() => { setTimeout(() => {
......
...@@ -5855,10 +5855,10 @@ mute-stream@0.0.7, mute-stream@~0.0.4: ...@@ -5855,10 +5855,10 @@ mute-stream@0.0.7, mute-stream@~0.0.4:
resolved "https://registry.yarnpkg.com/mute-stream/-/mute-stream-0.0.7.tgz#3075ce93bc21b8fab43e1bc4da7e8115ed1e7bab" resolved "https://registry.yarnpkg.com/mute-stream/-/mute-stream-0.0.7.tgz#3075ce93bc21b8fab43e1bc4da7e8115ed1e7bab"
integrity sha1-MHXOk7whuPq0PhvE2n6BFe0ee6s= integrity sha1-MHXOk7whuPq0PhvE2n6BFe0ee6s=
nan@2.10.0, nan@^2.9.2, nan@~2.10.0: nan@2.12.1:
version "2.10.0" version "2.12.1"
resolved "https://registry.yarnpkg.com/nan/-/nan-2.10.0.tgz#96d0cd610ebd58d4b4de9cc0c6828cda99c7548f" resolved "https://registry.yarnpkg.com/nan/-/nan-2.12.1.tgz#7b1aa193e9aa86057e3c7bbd0ac448e770925552"
integrity sha512-bAdJv7fBLhWC+/Bls0Oza+mvTaNQtP+1RyhhhvD95pgUJz6XM5IzgmxOkItJ9tkoCiplvAnXI1tNmmUD/eScyA== integrity sha512-JY7V6lRkStKcKTvHO5NVSQRv+RV+FIL5pvDoLiAtSL9pKlC5x9PKQcZDsq7m4FO4d57mkhC6Z+QhAh3Jdk5JFw==
nan@2.8.0, nan@^2.8.0: nan@2.8.0, nan@^2.8.0:
version "2.8.0" version "2.8.0"
...@@ -5870,6 +5870,11 @@ nan@^2.10.0: ...@@ -5870,6 +5870,11 @@ nan@^2.10.0:
resolved "https://registry.yarnpkg.com/nan/-/nan-2.11.0.tgz#574e360e4d954ab16966ec102c0c049fd961a099" resolved "https://registry.yarnpkg.com/nan/-/nan-2.11.0.tgz#574e360e4d954ab16966ec102c0c049fd961a099"
integrity sha512-F4miItu2rGnV2ySkXOQoA8FKz/SR2Q2sWP0sbTxNxz/tuokeC8WxOhPMcwi0qIyGtVn/rrSeLbvVkznqCdwYnw== integrity sha512-F4miItu2rGnV2ySkXOQoA8FKz/SR2Q2sWP0sbTxNxz/tuokeC8WxOhPMcwi0qIyGtVn/rrSeLbvVkznqCdwYnw==
nan@^2.9.2, nan@~2.10.0:
version "2.10.0"
resolved "https://registry.yarnpkg.com/nan/-/nan-2.10.0.tgz#96d0cd610ebd58d4b4de9cc0c6828cda99c7548f"
integrity sha512-bAdJv7fBLhWC+/Bls0Oza+mvTaNQtP+1RyhhhvD95pgUJz6XM5IzgmxOkItJ9tkoCiplvAnXI1tNmmUD/eScyA==
nanomatch@^1.2.9: nanomatch@^1.2.9:
version "1.2.13" version "1.2.13"
resolved "https://registry.yarnpkg.com/nanomatch/-/nanomatch-1.2.13.tgz#b87a8aa4fc0de8fe6be88895b38983ff265bd119" resolved "https://registry.yarnpkg.com/nanomatch/-/nanomatch-1.2.13.tgz#b87a8aa4fc0de8fe6be88895b38983ff265bd119"
...@@ -5988,12 +5993,12 @@ node-pre-gyp@^0.10.0: ...@@ -5988,12 +5993,12 @@ node-pre-gyp@^0.10.0:
semver "^5.3.0" semver "^5.3.0"
tar "^4" tar "^4"
node-pty@0.8.0: node-pty@0.8.1:
version "0.8.0" version "0.8.1"
resolved "https://registry.yarnpkg.com/node-pty/-/node-pty-0.8.0.tgz#08bccb633f49e2e3f7245eb56ea6b40f37ccd64f" resolved "https://registry.yarnpkg.com/node-pty/-/node-pty-0.8.1.tgz#94b457bec013e7a09b8d9141f63b0787fa25c23f"
integrity sha512-g5ggk3gN4gLrDmAllee5ScFyX3YzpOC/U8VJafha4pE7do0TIE1voiIxEbHSRUOPD1xYqmY+uHhOKAd3avbxGQ== integrity sha512-j+/g0Q5dR+vkELclpJpz32HcS3O/3EdPSGPvDXJZVJQLCvgG0toEbfmymxAEyQyZEpaoKHAcoL+PvKM+4N9nlw==
dependencies: dependencies:
nan "2.10.0" nan "2.12.1"
node-uuid@~1.4.0, node-uuid@~1.4.7: node-uuid@~1.4.0, node-uuid@~1.4.7:
version "1.4.8" version "1.4.8"
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册