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

Fix environment variables value retrieval #5111

Merged
merged 4 commits into from
May 19, 2022
Merged

Conversation

rjbou
Copy link
Collaborator

@rjbou rjbou commented Apr 4, 2022

Environment variable value retrieval system uses lazy to not probe environment variables values several times. It had a side effect that, if a env var value is retrieved before init step, it is set to undefined (None) for all other call. And it was the case for OPAMCURL and OPAMFETCH that are used in OpamInitDefaults to set up the default init config (and called at toplevel in OpamConfigCommand, but we can consider that it is legitimate to call it before init via the opam lib).
To allow that usage, this PR adds a direct probing of the environment variable value.

fix #5108

@rjbou rjbou added the KIND: BUG label Apr 4, 2022
@rjbou rjbou added this to the 2.2.0~alpha milestone Apr 4, 2022
@rjbou rjbou requested a review from dra27 April 4, 2022 19:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

opam init does not honour OPAMCURL, OPAMFETCH, ...
1 participant