Skip to content

COMP: Add shell: bash to Download ITK step for Windows#130

Merged
hjmjohnson merged 1 commit intoInsightSoftwareConsortium:v5.4.6from
hjmjohnson:fix-download-itk-shell
Apr 15, 2026
Merged

COMP: Add shell: bash to Download ITK step for Windows#130
hjmjohnson merged 1 commit intoInsightSoftwareConsortium:v5.4.6from
hjmjohnson:fix-download-itk-shell

Conversation

@hjmjohnson
Copy link
Copy Markdown
Member

Fix Windows CI failure introduced by #128: the Download ITK step uses $ITK_BUILD_ROOT (bash syntax) without specifying shell: bash, so on Windows it runs in pwsh where the variable is undefined and the cd is a no-op.

Same bug exists on main — will open a matching PR after this merges.

Root cause

GitHub Actions defaults to pwsh on Windows. In PowerShell, environment variables are accessed via $env:VAR, not $VAR. The "Build ITK (Windows)" step correctly uses $env:ITK_BUILD_ROOT, but the "Download ITK" step (which runs on all platforms) uses bash-style $ITK_BUILD_ROOT without an explicit shell: bash directive.

Result: ITK gets cloned into the repo checkout dir instead of the junction-shortened build root. The subsequent cmake configure fails with The source directory "D:/PerformanceB/ITK" does not exist.

Affected modules

Every module using @v5.4.6 on Windows is affected. Confirmed failing: ITKPerformanceBenchmarking#98.

The Download ITK step uses $ITK_BUILD_ROOT (bash syntax) but has no
explicit shell: directive. On Windows, GitHub Actions defaults to pwsh
where $ITK_BUILD_ROOT is undefined (needs $env:ITK_BUILD_ROOT). The cd
becomes a no-op, ITK gets cloned into the repo checkout directory
instead of the build root, and cmake fails with "source directory does
not exist".

Adding shell: bash ensures the step uses Git Bash on Windows, where
$ITK_BUILD_ROOT correctly reads the environment variable.
@hjmjohnson hjmjohnson marked this pull request as ready for review April 15, 2026 19:34
@hjmjohnson hjmjohnson merged commit 122a1f9 into InsightSoftwareConsortium:v5.4.6 Apr 15, 2026
1 check passed
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.

2 participants