Thanks to visit codestin.com
Credit goes to github.com

Skip to content

fix: make create-playwright work under CMD#592

Merged
Skn0tt merged 1 commit into
microsoft:mainfrom
Skn0tt:create-playwright-separator
Jan 10, 2025
Merged

fix: make create-playwright work under CMD#592
Skn0tt merged 1 commit into
microsoft:mainfrom
Skn0tt:create-playwright-separator

Conversation

@Skn0tt

@Skn0tt Skn0tt commented Jan 10, 2025

Copy link
Copy Markdown
Member

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 Copilot and dgozman January 10, 2025 13:02
@Skn0tt Skn0tt self-assigned this Jan 10, 2025

Copilot AI left a comment

Copy link
Copy Markdown

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.

@dgozman dgozman left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Magic!

@Skn0tt

Skn0tt commented Jan 10, 2025

Copy link
Copy Markdown
Member Author

Indeed

@Skn0tt Skn0tt merged commit 7ec54c5 into microsoft:main Jan 10, 2025
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

3 participants