Respect VCPKG_ROOT by... ignoring it? 🤯
keynmol opened this issue · 0 comments
keynmol commented
About 20 days ago, GH runners started settings VCPKG_ROOT variable:
actions/runner-images#6228
This causes basically all of my sbt-vcpkg-based projects to fail.
Through vigorous scientific testing in this PR I've determined that it's indeed caused by the variable and it can be overridden if necessary.
I think the plan should be:
- Harden the setting for VcpkgRoot
- Users should be able to set them manually
- Users should specify to use the environment variable
- Users should be able to rely on default cache locations (current behaviour)
- Users should specify whether they want to allow bootstrapping
- All the different init mechanisms should come with a
orElse
method to build a fallback chain
- Set the default mode to
VcpkgRoot.FromEnv(allowBootstrap = true).orElse(VcpkgRoot.SystemCache(allowBootstrap = true)
- "if the env variable is present, use that, and if the vcpkg binary is not there - allow bootstrapping that location. if the variable is not present, use system cache location"