Windows executor no longer respecting PATH

Some time in the past two weeks the Windows/powershell executors stopped applying the PATH specified in the registry.

I first noticed the issue in the job https://app.circleci.com/pipelines/github/pingbird/puro/354/workflows/bcc4a93c-c723-4ca2-bfde-83317a16e548/jobs/1493 where Chocolatey adds C:\tools\dart-sdk\bin in the “Install Dart” step but the dart executable can no longer be found.

To make sure this isn’t just an issue with Chocolatey I added it manually with [Environment]::SetEnvironmentVariable to no avail at https://app.circleci.com/pipelines/github/pingbird/puro/360/workflows/79e12893-a7b0-4e16-a3d5-58dd17809c60/jobs/1517 (click “show more” in the “Install Dart” step to see the commands) and note that echo $env:path does not print the folder.

Re-running my last successful build https://app.circleci.com/pipelines/github/pingbird/puro/353/workflows/6f681975-719e-4425-ae0d-f0cc327de926/jobs/1485 shows the same error as the new commits in https://app.circleci.com/pipelines/github/pingbird/puro/353/workflows/0ad45fb4-0748-47ea-9d35-069dbf698883/jobs/1527 and nothing else on my end has changed since then.

Hi there!

Will you please change your executor to “‘windows-server-2019-vs2019:stable’” or " windows-server-2019-vs2019:2022.08.1"and let us know if this results in a green build? We have escalated an issue related to this recently and the engineering team will be looking to release a fix.

That fixed it, thanks!

    machine:
      image: windows-server-2019-vs2019:stable
      resource_class: windows.medium
      shell: powershell.exe -ExecutionPolicy Bypass
1 Like