Skip to content

Commit 4276906

Browse files
authored
do not enable OSC 7 support for old 5.x powershell (#2485)
fix for #2471, and better debugging for #2481
1 parent 80c25de commit 4276906

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

pkg/remote/conncontroller/conncontroller.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -487,6 +487,7 @@ func (conn *SSHConn) InstallWsh(ctx context.Context, osArchStr string) error {
487487
}
488488
if err != nil {
489489
conn.Infof(ctx, "ERROR detecting client platform: %v\n", err)
490+
return fmt.Errorf("error detecting client platform: %w", err)
490491
}
491492
conn.Infof(ctx, "detected remote platform os:%s arch:%s\n", clientOs, clientArch)
492493
err = remote.CpWshToRemote(ctx, client, clientOs, clientArch)

pkg/util/shellutil/shellintegration/pwsh_wavepwsh.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@ Remove-Item Env:WAVETERM_SWAPTOKEN
1212
# Load Wave completions
1313
wsh completion powershell | Out-String | Invoke-Expression
1414

15+
if ($PSVersionTable.PSVersion.Major -lt 7) {
16+
return # skip OSC setup entirely
17+
}
18+
1519
$Global:_WAVETERM_SI_FIRSTPROMPT = $true
1620

1721
# shell integration

0 commit comments

Comments
 (0)