-
Notifications
You must be signed in to change notification settings - Fork 172
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ruby environment activation fails in PowerShell #2434
Comments
Thank you for the report. It seems related to the quotes around the version number, but it's unclear on why exactly it's failing. Unfortunately none of the maintainers are Windows users so we will hope the community can assist with solving this. |
Simple escaping
The original (unescaped) command also works in vanilla Command Prompt (
I couldn't find a way to select shell for the activation command, so potential fixes could be escaping quotes in PowerShell or using Command Prompt. |
I have the same problem (activation fails on PowerShell) running ruby-lsp with the same environment as @slabstone but on Windows 11. In my case, The VSCode extension fails to activate and remains stuck as "Starting". The output in VSCode looks like this:
The problem appears when PowerShell tries to load the user profile ( My Powershell profile looks like this: oh-my-posh init pwsh --config "$env:POSH_THEMES_PATH/easy-term.omp.json" | Invoke-Expression
Import-Module -Name Terminal-Icons
Import-Module -Name PSPasswordGenerator
Set-PSReadLineOption -PredictionSource HistoryAndPlugin
Set-PSReadLineOption -PredictionViewStyle ListView
Set-PSReadLineOption -EditMode Windows
winfetch The extension fails to activate due to the Once these lines are removed from the profile, the extension activates succesfully. You can also force ruby-lsp to use another shell in a workspace changing the VSCode setting {
"terminal.integrated.defaultProfile.windows": "Command Prompt"
} Making ruby-lsp avoid PowerShell will likely fix this issue. You could also force PowerShell not to load the user profile with the argument pwsh.exe -NoProfile -Command "Command-Here" @andyw8 Is it possible to let the user choose/force which shell (shell path) to use on the ruby-lsp extension settings in VSCode? so we don't have to change the value of |
Based on the context provided here, I believe #2489 will fix this. Using the user's default shell to invoke the scripts is relevant for Linux and MacOS, but probably not for Windows. We can just standardize to always activate using |
Description
Description
Ruby LSP fails to activate Ruby after plugin version 0.7.8
Environment
Reproduction steps
VS Code output logs
This command indeed fails in PowerShell
Additional information
This does not reproduce on VS Code plugin v0.7.5 or earlier. First version to have this bug is v0.7.8.
VS Code logs with plugin v0.7.5
The text was updated successfully, but these errors were encountered: