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

OpamConfigCommand: avoid capturing the Unix.environment at top level #5174

Closed
wants to merge 1 commit into from

Conversation

hannesm
Copy link
Member

@hannesm hannesm commented Jul 11, 2022

This is a continuation of #4111 #4789, this time in OpamConfigCommand, which
captures (via a call to OpamInitDefault.init_config ()) the Unix environment
at startup. This is crucial if opam-client is used as a library that modifies
the environment before execution of opam functionality.

This PR is for the 2.1 branch but should apply cleanly on the main branch as well. Are there plans to continue 2.1, or will that version be abandoned in favour of 2.2?

This is a continuation of ocaml#4111 ocaml#4789, this time in OpamConfigCommand, which
captures (via a call to OpamInitDefault.init_config ()) the Unix environment
at startup. This is crucial if opam-client is used as a library that modifies
the environment before execution of opam functionality.
@hannesm
Copy link
Member Author

hannesm commented Jul 11, 2022

NB I git grep for OpamInitDefaults.init_config` to ensure nothing else calls it at top level.

@rjbou
Copy link
Collaborator

rjbou commented Jul 11, 2022

This is fixed by #5162 on master. I add it to list of PRs to backport in #5000

@hannesm
Copy link
Member Author

hannesm commented Jul 11, 2022

Ah nice, thanks. I'm working on the latest 2.1 release, and whenever I encounter issues I try to fix them on the 2.1 branch.

A 2.1.3 release would be very welcome then :)

@hannesm hannesm closed this Jul 11, 2022
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