Open QuYue opened 3 years ago
Could you share the log from the Remote-SSH output channel when it fails?
If I add the command Set-PoshPrompt -Theme D:\Others\My_Config\quyue.omp.json
to my
$profile (Microsoft.Powershell_profile.ps1)file in my server. The other computers can not connect to my server by Remote-ssh function.
More interestingly, the server even can not connect itself by remote -ssh.
We expect the string Windows PowerShell
to be written. We need a predictable string to wait for. If we send the script over before powershell has fully started, we can lose data.
I don't know how to fix this in general. It would be really helpful if someone can tell me what configuration exactly in Oh-My-Posh changes this. You could work around it by changing your powershell profile to output this string.
Having this problem too when using oh-my-posh built-in theme
Import-Module oh-my-posh;
Set-PoshPrompt -Theme cert;
We expect the string Windows PowerShell to be written. We need a predictable string to wait for.
What is that string?
Using theme:
PowerShell 7.1.4
Copyright (c) Microsoft Corporation.
https://aka.ms/powershell
Type 'help' to get help.
Loading personal and system profiles took 1277ms.
Jack@Jack-SB3 Workspace
Not using theme (-NoProfile
):
PowerShell 7.1.4
Copyright (c) Microsoft Corporation.
https://aka.ms/powershell
Type 'help' to get help.
PS C:\Users\Jack\Workspace>
I didn't see the string Windows PowerShell
in the latter version too.
Ok, thank you very much @roblourens. Now, I don't use oh-my-posh anymore.
Yes, when the powershell shows "loading personal and system profiles took xx ms.“, the remote can not work.
But it did work when not using the theme? Whenever I start powershell I get
Windows PowerShell
Copyright (C) Microsoft Corporation. All rights reserved.
Try the new cross-platform PowerShell https://aka.ms/pscore6
PS C:\Users\roblou>
But it did work when not using the theme? Whenever I start powershell I get
Ah, I'm using pwsh
as my default SSH shell. So the output is Powershell
instead of Windows Powershell
@QuYue hi please don't close this because others are still having this problem. you can unsubscribe from this issue if you're not interested anymore.
Oh, so sorry. I misoperated.
I have had this problem too, but the remote could work sometimes.
Issue Type: Bug
When I intsall Oh-my-posh (v3) on my powershell in my computer. The other computer can not remote this computer by remote-ssh function in Vscode. It will stop in "initial Vs code server" process.
VS Code version: Code 1.59.1 (3866c3553be8b268c8a7f8c0482c0c0177aa8bfa, 2021-08-19T11:56:46.957Z) OS version: Windows_NT x64 10.0.19042 Restricted Mode: No