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) 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