Skip to content

fix(ci): set ChocolateyInstall env var default for Windows runners#3826

Draft
Leiyks wants to merge 1 commit intomasterfrom
leiyks/fix-ci-verify-windows
Draft

fix(ci): set ChocolateyInstall env var default for Windows runners#3826
Leiyks wants to merge 1 commit intomasterfrom
leiyks/fix-ci-verify-windows

Conversation

@Leiyks
Copy link
Copy Markdown
Contributor

@Leiyks Leiyks commented Apr 24, 2026

Problem

The verify windows CI job was failing intermittently (3 times in 24h) because $env:ChocolateyInstall is not set on persistent Windows runners where Chocolatey was pre-installed by the base image rather than installed by the CI script itself. This caused the Chocolatey profile import to fail.

Fix

Add a one-line fallback that sets $env:ChocolateyInstall to the standard installation path (C:\ProgramData\chocolatey) if it is not already set. This is the well-known default path used by the Chocolatey installer and is safe to assume on any Windows machine where Chocolatey is installed.

Impact

Minimal — only affects the verify_windows.ps1 script. No production code changed. When $env:ChocolateyInstall is already set (fresh installs), the fallback has no effect.

…olatey on Windows runners

On persistent Windows CI runners, Chocolatey is pre-installed by the
base image and $env:ChocolateyInstall is not set. Add a fallback to
the standard installation path before using the variable.
@datadog-official
Copy link
Copy Markdown

datadog-official Bot commented Apr 24, 2026

Tests

🎉 All green!

❄️ No new flaky tests detected
🧪 All tests passed

🎯 Code Coverage (details)
Patch Coverage: 100.00%
Overall Coverage: 60.65% (+0.00%)

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: a5e70ef | Docs | Datadog PR Page | Give us feedback!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant