Repository navigation
Add host readiness health check module - #6
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| if (-not $IsWindows) { | ||
| throw 'HBV-HealthCheck.ps1 must be executed on a Windows host.' | ||
| } |
There was a problem hiding this comment.
Guard clause rejects PowerShell 5.1 on Windows
The new module immediately throws when $IsWindows is falsey, but $IsWindows is only defined in PowerShell 6+. On the default Windows PowerShell 5.1 the variable is $null, so this check always throws and the health check cannot run on supported Windows hosts. Consider using [Environment]::OSVersion.Platform or Get-CimInstance Win32_OperatingSystem to detect non‑Windows systems instead of relying on $IsWindows.
Useful? React with 👍 / 👎.
Summary
Testing
pwsh -NoProfile -Command "[ScriptBlock]::Create((Get-Content -Raw -Path './HBV-HealthCheck.ps1')) | Out-Null"(fails: pwsh not available in container)Codex Task