Skip to content

Commit e306e5a

Browse files
committed
Only send 633;E nonce when not Windows 10
Fixes microsoft#210353
1 parent c002405 commit e306e5a

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/vs/workbench/contrib/terminal/browser/media/shellIntegration.ps1

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,9 @@ $Global:__LastHistoryId = -1
2121
$Nonce = $env:VSCODE_NONCE
2222
$env:VSCODE_NONCE = $null
2323

24+
$osVersion = [System.Environment]::OSVersion.Version
25+
$isWindows10 = $osVersion.Major -eq 10 -and $osVersion.Minor -eq 0 -and $osVersion.Build -lt 22000
26+
2427
if ($env:VSCODE_ENV_REPLACE) {
2528
$Split = $env:VSCODE_ENV_REPLACE.Split(":")
2629
foreach ($Item in $Split) {
@@ -105,7 +108,9 @@ if (Get-Module -Name PSReadLine) {
105108
# OSC 633 ; E ; <CommandLine?> ; <Nonce?> ST
106109
$Result = "$([char]0x1b)]633;E;"
107110
$Result += $(__VSCode-Escape-Value $CommandLine)
108-
$Result += ";$Nonce"
111+
if ($IsWindows10 -eq $false) {
112+
$Result += ";$Nonce"
113+
}
109114
$Result += "`a"
110115
[Console]::Write($Result)
111116

0 commit comments

Comments
 (0)