Closed
Description
In GitHub Codespaces and VS Code Development containers, $env:PROCESSOR_ARCHITECTURE is empty - leading to an error when running New-ALZEnvironment
.
Expected Behavior
New-ALZEnvironment -alzIacProvider bicep -alzCicdPlatform github
should not throw an error due to $env:PROCESSOR_ARCHITECTURE being empty
Current Behavior
New-ALZEnvironment -alzIacProvider bicep -alzCicdPlatform github in pwsh at 10:08:54
Getting ready to create a new ALZ environment with you...
Downloading alz-terraform-accelerator Terraform module to .
InvalidOperation: /tmp/ALZ-PowerShell-Module/src/ALZ/Private/Get-HCLParserTool.ps1:23:27
Line |
23 | $architecture = $($env:PROCESSOR_ARCHITECTURE).ToLower()
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~
| You cannot call a method on a null-valued expression.
Possible Solution
Steps to Reproduce
- Open a GitHub Codespace or VS Code Development container
- Open a terminal running pwsh
- Install ALZ-PowerShell-Module
- Run New-ALZEnvironment -alzIacProvider bicep -alzCicdPlatform github
Context (Environment)
- Operating System and version as reported by
$PSVersionTable.OS
: Linux 5.15.90.1-microsoft-standard-WSL2 An initial skeletal version of the AZ PowerShell module #1 SMP Fri Jan 27 02:56:13 UTC 2023 - PowerShell versions as reported by
$PSVersionTable.PSEdition
: 7.3.6