PSReadLine
PSReadLine copied to clipboard
Powershell Core 7.2 issue on MacOS Monterey
Prerequisites
- [X] Write a descriptive title.
- [X] Make sure you are able to repro it on the latest released version
- [X] Search the existing issues, especially the pinned issues.
Exception report
Hello all, I'm running into this issue when trying to create a new PowerShell Core window on my MacBook Pro.
Oops, something went wrong.
Please report this bug with ALL the details below, including both the 'Environment' and 'Exception' sections.
Please report on GitHub: https://github.com/PowerShell/PSReadLine/issues/new?template=Bug_Report.md
Thank you!
### Environment
PSReadLine: 2.2.0-beta1
PowerShell: 7.2.0
OS: Darwin 21.1.0 Darwin Kernel Version 21.1.0: Wed Oct 13 17:33:23 PDT 2021; root:xnu-8019.41.5~1/RELEASE_X86_64
BufferWidth: 190
BufferHeight: 50
Last 0 Keys
Exception
System.TypeLoadException: Could not load type 'System.Management.Automation.Subsystem.PredictionResult' from assembly 'Microsoft.PowerShell.PSReadLine.Polyfiller, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'.
at Microsoft.PowerShell.PSConsoleReadLine.PredictionViewBase.Reset()
at Microsoft.PowerShell.PSConsoleReadLine.PredictionInlineView.Reset()
at Microsoft.PowerShell.PSConsoleReadLine.Prediction.Reset()
at Microsoft.PowerShell.PSConsoleReadLine.Initialize(Runspace runspace, EngineIntrinsics engineIntrinsics)
at Microsoft.PowerShell.PSConsoleReadLine.ReadLine(Runspace runspace, EngineIntrinsics engineIntrinsics, CancellationToken cancellationToken)
### Screenshot
<img width="1343" alt="Screen Shot 2021-11-13 at 4 07 27 PM" src="https://user-images.githubusercontent.com/3642672/141660393-9358c1d9-7441-437a-89a5-dc511987b0c9.png">
### Environment data
```console
### Environment
PSReadLine: 2.2.0-beta1
PowerShell: 7.2.0
OS: Darwin 21.1.0 Darwin Kernel Version 21.1.0: Wed Oct 13 17:33:23 PDT 2021; root:xnu-8019.41.5~1/RELEASE_X86_64
BufferWidth: 190
BufferHeight: 50
Last 0 Keys
Steps to reproduce
Create a new PowerShell Core window or tab
Expected behavior
A new window should be created
Actual behavior
PowerShell Core throws this error and I cannot move forward with using it.
Fixed this issue with running this command from my terminal.
pwsh -noprofile -command "Install-Module PSReadLine -Force -SkipPublisherCheck -AllowPrerelease"