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

feat: Prefer powershell core over powershell windows #349

Closed
wants to merge 2 commits into from

Conversation

ShreyasJejurkar
Copy link

@ShreyasJejurkar ShreyasJejurkar commented Oct 15, 2024

This PR check does the user has new Powershell core, if it uses that, in case if it's not then it fallbacks to the old Windows tied PowerShell

@sindresorhus
Copy link
Owner

Why does it matter which PowerShell it uses?

@ShreyasJejurkar
Copy link
Author

Why does it matter which PowerShell it uses?

Windows PowerShell is an old version of PS that is no longer updated and tied to Windows. In contrast, the new PowerShell core is open source, cross-platform, and regularly updated with new features and performance improvements.

@sindresorhus
Copy link
Owner

But that doesn't really matter in our case. We just use it to execute a single command. I can think of more downsides: potentially breaking changes, differing behavior, etc.

@ShreyasJejurkar
Copy link
Author

potentially breaking changes, differing behavior

Powershell Core is the same as the old Powershell but with a better-performing runtime and the same feature parity as the old one.

And also if we don't find a new PowerShell, we are anyway to fallback to the old one to avoid any breaking things.

@sindresorhus
Copy link
Owner

Powershell Core is the same as the old Powershell but with a better-performing runtime and the same feature parity as the old one.

Minor performance differences does not really matter much here. The slow part is launching the apps, not executing the command. And you haven't really provided any evidence of performance improvements for this specific case.

And also if we don't find a new PowerShell, we are anyway to fallback to the old one to avoid any breaking things.

That's not the kind of breaking changes I'm talking about. The core one is a moving target. It may be identical today, but in 2 years, it may break some feature or subtly change some behavior.

@sindresorhus
Copy link
Owner

I'm going to pass on this as the benefit does not outweigh the risk.

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.

2 participants