Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[vcpkg] Environment Variable Passthrough #7290

Merged
merged 5 commits into from
Jul 18, 2019

Conversation

cbezault
Copy link
Contributor

Currently on Windows the only environment variables available to the portfile are those found on a whitelist hard-coded into vcpkg. This change allows us to set the variables passed through as a Cmake list in the triplet.

A change should be made to vcpkg to sanitize the linux environment.

@cbezault cbezault added the info:internal This PR or Issue was filed by the vcpkg team. label Jul 16, 2019
if (feature == "core")
return Util::fmap_flatten(feature_list,
[&](std::string const& feature) -> std::vector<Features> {
if (feature == "core")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Small nitpick: Indentation

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, I noticed that in the next PR.

const std::string& abi_tag,
const BuildPackageConfig& config)
static std::vector<System::CMakeVariable> get_cmake_vars(const VcpkgPaths& paths,
const PreBuildInfo& pre_build_info,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pre_build_info is not used in the function

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah true, but it will be 😄, I'll get rid of it for this PR.

@vicroms
Copy link
Member

vicroms commented Jul 17, 2019

@cbezault

Do you consider necessary to remove VCPKG_KEEP_ENV_VARS implemented in PR #5650 and only allow passing environment variables through a triplet file?

@cbezault
Copy link
Contributor Author

No I don't think it's necessary, the two can live together.

Copy link
Contributor

@Rastaban Rastaban left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think I spent more time sorting through all the unrelated cleanup than reviewing the actual passthrough change. We should get this checked in so it cleans up your other related PRs :)

@cbezault cbezault merged commit bb3a9dd into microsoft:master Jul 18, 2019
@cbezault cbezault mentioned this pull request Jul 19, 2019
strega-nil pushed a commit to strega-nil/vcpkg that referenced this pull request May 5, 2021
* use additional env param

* remove partials

* remove change to linux triplet

* Fix some issues that vicroms pointed out

* whitespace change
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
info:internal This PR or Issue was filed by the vcpkg team.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants