winget-cli icon indicating copy to clipboard operation
winget-cli copied to clipboard

Error installing PowerShell module using PSResourceGet

Open mgreenegit opened this issue 2 years ago • 1 comments

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

mgreenegit avatar Aug 04 '23 19:08 mgreenegit

Seem this can be closed as I can't replicate this @denelon

kilasuit avatar Apr 25 '24 11:04 kilasuit