Closed ForNeVeR closed 7 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.
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.)
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).
I mean this setting, PowerShell executable path:
Does it not work?
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?