Skip to content
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

Always run Ruby activation using cmd for RubyInstaller #2489

Merged
merged 1 commit into from
Aug 28, 2024

Conversation

vinistock
Copy link
Member

Motivation

Closes #2434

Our Ruby environment activation script doesn't work for Windows user who select their default shell as Powershell due to quote escaping issues.

I believe cmd.exe will always be available and it's the default option when invoking NodeJS' exec function, so instead of trying to escape the script differently depending on the shell, I think we should just always run RubyInstaller activation on cmd.exe.

Implementation

I created an override for runScript, which removes the shell part for RubyInstaller only.

Automated Tests

Added a test verifying that we're not passing shell to exec.

@vinistock vinistock added bugfix This PR will fix an existing bug vscode This pull request should be included in the VS Code extension's release notes labels Aug 26, 2024
@vinistock vinistock self-assigned this Aug 26, 2024
@vinistock vinistock requested a review from a team as a code owner August 26, 2024 18:18
@vinistock vinistock requested review from andyw8 and st0012 August 26, 2024 18:18
@vinistock vinistock merged commit 7211b2a into main Aug 28, 2024
34 checks passed
@vinistock vinistock deleted the vs-powershell-fix branch August 28, 2024 17:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugfix This PR will fix an existing bug vscode This pull request should be included in the VS Code extension's release notes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Ruby environment activation fails in PowerShell
2 participants