intellij-powershell icon indicating copy to clipboard operation
intellij-powershell copied to clipboard

Migrate to PowerShell Core by default?

Open ForNeVeR opened this issue 1 year ago • 4 comments

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?

ForNeVeR avatar Nov 25 '23 18:11 ForNeVeR

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.

andrewimcclement avatar Jan 17 '24 13:01 andrewimcclement

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.)

ForNeVeR avatar Jan 17 '24 13:01 ForNeVeR

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).

andrewimcclement avatar Jan 17 '24 13:01 andrewimcclement

I mean this setting, PowerShell executable path: image

Does it not work?

ForNeVeR avatar Jan 17 '24 19:01 ForNeVeR