Skip to content

$env:PROCESSOR_ARCHITECTURE is empty in Codespaces/Dev containers #71

Closed
@janegilring

Description

@janegilring

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

  1. Open a GitHub Codespace or VS Code Development container
  2. Open a terminal running pwsh
  3. Install ALZ-PowerShell-Module
  4. Run New-ALZEnvironment -alzIacProvider bicep -alzCicdPlatform github

Context (Environment)

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions