Check if PSReadline is installed first
This commit is contained in:
parent
0599cd96f1
commit
bf49b460d8
1 changed files with 1 additions and 1 deletions
|
@ -87,7 +87,7 @@ Remove-Variable -Name nvim
|
||||||
$OutputEncoding = [System.Text.Encoding]::UTF8
|
$OutputEncoding = [System.Text.Encoding]::UTF8
|
||||||
|
|
||||||
# Try upgrading the default version of PSReadLine to something newer.
|
# Try upgrading the default version of PSReadLine to something newer.
|
||||||
if ((Get-Module PSReadline).Version -le [Version]"2.0.0.0") {
|
if ($null -ne (Get-Module PSReadline).Version -and (Get-Module PSReadline).Version -le [Version]"2.0.0.0") {
|
||||||
try {
|
try {
|
||||||
Write-Host "PSReadLine <= 2.0.0.0. Trying to upgrade..."
|
Write-Host "PSReadLine <= 2.0.0.0. Trying to upgrade..."
|
||||||
Install-Module -Scope CurrentUser -Name PSReadLine -Force -ErrorAction SilentlyContinue
|
Install-Module -Scope CurrentUser -Name PSReadLine -Force -ErrorAction SilentlyContinue
|
||||||
|
|
Loading…
Reference in a new issue