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

fix: make create-playwright work under CMD #592

Merged
merged 1 commit into from
Jan 10, 2025

Conversation

Skn0tt
Copy link
Member

@Skn0tt Skn0tt commented Jan 10, 2025

Closes microsoft/playwright#34266. When we create the terminal, we don't know whether it's bash, Powershell, CMD or anything else. The VS Code API also doesn't give a good API to control that. So we need our npm init command to work under all three shells.

#526 fixed a bug with NPM and Powershell, but regressed CMD:

Screenshot 2025-01-10 at 13 58 12

Look at the bottom line: Under CMD, it incorrectly picks up '--' as the directory to create the project in.

I've played around with it, and found a command that's interpreted the same by all three shells:


cmd


powershell


zsh

@Skn0tt Skn0tt requested review from dgozman and Copilot January 10, 2025 13:02
@Skn0tt Skn0tt self-assigned this Jan 10, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot reviewed 1 out of 1 changed files in this pull request and generated no comments.

Copy link
Contributor

@dgozman dgozman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Magic!

@Skn0tt
Copy link
Member Author

Skn0tt commented Jan 10, 2025

Indeed

@Skn0tt Skn0tt merged commit 7ec54c5 into microsoft:main Jan 10, 2025
4 of 6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: In VS Code Install Playwright command creates -- directory on Windows 10
2 participants