Skip to content

Preserve PATH CMake in Windows vcpkg env bootstrap#161

Merged
lukka merged 3 commits into
mainfrom
copilot/how-to-use-get-cmake
Jun 30, 2026
Merged

Preserve PATH CMake in Windows vcpkg env bootstrap#161
lukka merged 3 commits into
mainfrom
copilot/how-to-use-get-cmake

Conversation

Copilot AI commented Jun 25, 2026

Copy link
Copy Markdown
Contributor

Windows builds could invoke Visual Studio’s bundled CMake (4.x) during vcpkg dependency builds, even when workflows had already installed/pinned CMake via lukka/get-cmake. This came from the default runVcpkgEnvFormatString including --tools, which can reorder PATH toward toolchain-provided binaries.

  • Default behavior change (action input)

    • Updated runVcpkgEnvFormatString default in action.yml to remove --tools.
    • Result: vcpkg env no longer prefers VS-integrated CMake by default; CMake already on PATH (e.g. from get-cmake) remains preferred.
  • Documentation clarity

    • Added README note explaining the new default and why.
    • Documented opt-in path for users who still want --tools via explicit runVcpkgEnvFormatString.
  • Regression guard

    • Added a focused unit assertion ensuring the default string does not reintroduce --tools.
# before
runVcpkgEnvFormatString: "[`env`, `--bin`, `--include`, `--tools`, `--python`, `--triplet`, `$[env.VCPKG_DEFAULT_TRIPLET]`, `set`]"

# after
runVcpkgEnvFormatString: "[`env`, `--bin`, `--include`, `--python`, `--triplet`, `$[env.VCPKG_DEFAULT_TRIPLET]`, `set`]"

Copilot AI changed the title [WIP] Fix vcpkg to use get-cmake for building dependencies Preserve PATH CMake in Windows vcpkg env bootstrap Jun 25, 2026
Copilot finished work on behalf of lukka June 25, 2026 07:20
Copilot AI requested a review from lukka June 25, 2026 07:20
@lukka
lukka marked this pull request as ready for review June 25, 2026 07:25
lukka

This comment was marked as duplicate.

@lukka

lukka commented Jun 25, 2026

Copy link
Copy Markdown
Owner

@copilot Instead of changing the existing behavior, why not simply document how to omit the --tools flag so that tool paths are not added to the PATH environment variable.

Copilot AI commented Jun 25, 2026

Copy link
Copy Markdown
Contributor Author

@copilot Instead of changing the existing behavior, why not simply document how to omit the --tools flag so that tool paths are not added to the PATH environment variable.

Implemented in 33b98df: restored the original default (keeps --tools) and updated the README to document how to omit --tools by setting a custom runVcpkgEnvFormatString.

@copilot Instead of changing the existing behavior, why not simply document how to omit the --tools flag so that tool paths are not added to the PATH environment variable.

Implemented in 33b98df: restored the original default (keeps --tools) and updated the README to document how to omit --tools by setting a custom runVcpkgEnvFormatString.

Copilot finished work on behalf of lukka June 25, 2026 07:35
Copilot AI requested a review from lukka June 25, 2026 07:35
@lukka
lukka merged commit 9de29d4 into main Jun 30, 2026
17 of 20 checks 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