From 21faa993d2646ab5a19ac973223a9ac17b83ecdd Mon Sep 17 00:00:00 2001 From: sawka Date: Mon, 27 Oct 2025 12:22:12 -0700 Subject: [PATCH 1/2] do not enable OSC 7 support for old 5.x powershell --- pkg/util/shellutil/shellintegration/pwsh_wavepwsh.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkg/util/shellutil/shellintegration/pwsh_wavepwsh.sh b/pkg/util/shellutil/shellintegration/pwsh_wavepwsh.sh index 32f54c9b67..b24288e305 100644 --- a/pkg/util/shellutil/shellintegration/pwsh_wavepwsh.sh +++ b/pkg/util/shellutil/shellintegration/pwsh_wavepwsh.sh @@ -12,6 +12,10 @@ Remove-Item Env:WAVETERM_SWAPTOKEN # Load Wave completions wsh completion powershell | Out-String | Invoke-Expression +if ($PSVersionTable.PSVersion.Major -lt 7) { + return # skip OSC setup entirely +} + $Global:_WAVETERM_SI_FIRSTPROMPT = $true # shell integration From 5a68dfe033aadfe39267a95d4a3c5932fe9d935a Mon Sep 17 00:00:00 2001 From: sawka Date: Mon, 27 Oct 2025 12:38:07 -0700 Subject: [PATCH 2/2] fix a bug related to #2481 (not returning an error from failure to detect client platform) --- pkg/remote/conncontroller/conncontroller.go | 1 + 1 file changed, 1 insertion(+) diff --git a/pkg/remote/conncontroller/conncontroller.go b/pkg/remote/conncontroller/conncontroller.go index 8d2d400f44..776db57c27 100644 --- a/pkg/remote/conncontroller/conncontroller.go +++ b/pkg/remote/conncontroller/conncontroller.go @@ -487,6 +487,7 @@ func (conn *SSHConn) InstallWsh(ctx context.Context, osArchStr string) error { } if err != nil { conn.Infof(ctx, "ERROR detecting client platform: %v\n", err) + return fmt.Errorf("error detecting client platform: %w", err) } conn.Infof(ctx, "detected remote platform os:%s arch:%s\n", clientOs, clientArch) err = remote.CpWshToRemote(ctx, client, clientOs, clientArch)