Closed LiteracyFanatic closed 3 years ago
I am having the same issue in macOS
I spent a little time debugging at it appears to be failing on line 115 of ./Source/Public/Get-SegmentedPath.ps1 on the cast of $buffer, an array of HashTables, to an array of PoshCode.Pansies.Text. This cast works when debugging in VSCode.
The error is being thrown from /Source/Public/Write-PowerlinePrompt.ps1#L203
- it looks like it is related to $Host.UI.RawUI.BackgroundColor
. See https://github.com/Jaykul/PowerLine/blob/master/Source/Public/Write-PowerlinePrompt.ps1#L149 - that is where the error is getting thrown from. Note how, at https://github.com/Jaykul/PowerLine/blob/master/Source/Public/Write-PowerlinePrompt.ps1#L127, it used to use $Host.UI.RawUI.BackgroundColor
but it is now $null
. When I change line 149 to use $null
, it seems to work for me.
I'm happy to submit a PR for this fix if I'm understanding the issue correctly.
I receive the following error on Arch Linux with PowerShell 7.0.0-rc.3: