winget-cli
winget-cli copied to clipboard
Error installing PowerShell module using PSResourceGet
Brief description of your issue
Error occurs when installing the module using install-psresource.
Steps to reproduce
install-psresource Microsoft.WinGet.Client -TrustRepository
Expected behavior
Install module without error (as is the case for PowerShellGet/Install-Module).
Actual behavior
Install-PSResource: At line:69 char:21
- NestedModules = if ($env:PROCESSOR_ARCHITECTURE -like 'x86')
-
~~~~~~~~~~~~~~~~~~~~~~~~~~~
A variable that cannot be referenced in restricted language mode or a Data section is being referenced. Variables that can be referenced include the following: $PSCulture, $PSUICulture, $true, $false, $null, $PSEdition, $PSScriptRoot.
Environment
Pwsh7.4p4
Seem this can be closed as I can't replicate this @denelon