The Install.ps1 doesn't return OSArchitecture correctly for all Windows PowerShell Versions Correctly
What issue are you seeing?
The Install.ps1 is leveraging this to pull the OS Architecture
$architecture = [System.Runtime.InteropServices.RuntimeInformation]::OSArchitecture
Under certain PowerShell configurations, that specific Property is filtered out, so it returns nothing and the script produces an error.
To ensure it returns properly across all PowerShell configurations. You should utilize this
$architecture = [System.Runtime.InteropServices.RuntimeInformation,mscorlib]::OSArchitecture.ToString().ToLower()
What steps can reproduce the bug?
Open PowerShell 7 or 5.1
Install-Module PSReadLine -force
Import-Module PSReadline
.\Install.ps1
Observe the error message that OSArchitecture doesn't exist on said object.
What is the expected behavior?
The script succeeds and doesn't produce an error
Additional information
_No response_
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗