We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3575c79 commit 6a3f7c9Copy full SHA for 6a3f7c9
src/PowerShellEditorServices/Session/PSReadLinePromptContext.cs
@@ -29,8 +29,8 @@ internal class PSReadLinePromptContext : IPromptContext {
29
[System.Diagnostics.DebuggerStepThrough()]
30
param()
31
end {
32
- $module = Get-Module -ListAvailable PSReadLine | Select-Object -First 1
33
- if (-not $module -or $module.Version -lt ([version]'2.0.0')) {
+ $module = Get-Module -ListAvailable PSReadLine | Where-Object Version -ge '2.0.0' | Sort-Object -Descending Version | Select-Object -First 1
+ if (-not $module) {
34
return
35
}
36
0 commit comments