ant-druha / intellij-powershell

Adds PowerShell language support to IntelliJ-based IDEs.
https://plugins.jetbrains.com/plugin/10249-powershell
Apache License 2.0
73 stars 20 forks source link

Migrate to PowerShell Core by default? #176

Closed ForNeVeR closed 7 months ago

ForNeVeR commented 11 months ago

Currently, the plugin prefers classic PowerShell if both PowerShell and PowerShell Core are available (see com.intellij.plugin.powershell.ide.run.PSExecutionUtilKt#findPsExecutable).

We should figure out if we it's safe to migrate to Core version by default.

My opinion is that if a person has explicitly installed the Core version, then it's likely they did that for a reason and want to use it: otherwise, why would they install it?

andrewimcclement commented 9 months ago

If it is decided that this isn't a good idea, an alternative would be to provide a setting for the default powershell path to use for scripts. (I'm assuming that this would be possible.) Of course, simply switching the default to PSCore is likely sufficient for most people, so that would be the simpler solution.

ForNeVeR commented 9 months ago

You can already switch the currently used PowerShell executable in the plugin settings. pwsh is expected to be fully supported, I use it myself. (Though I have to admit that my usage of script run configs may be lower than of some other features.)

andrewimcclement commented 9 months ago

Do you mean by editing the Run configuration template for PowerShell to point at the PSCore path? Or is there a more obvious setting somewhere? (I'm not entirely sure I know where to find the right settings).

ForNeVeR commented 9 months ago

I mean this setting, PowerShell executable path:

image

Does it not work?