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

opam config exec now does not set OPAMSWITCH unless --switch or OPAMSWITCH #2444

Merged
merged 1 commit into from Feb 24, 2016

Conversation

dsheets
Copy link
Member

@dsheets dsheets commented Feb 23, 2016

Previously, opam config exec would always set the OPAMSWITCH environment variable. This causes issues when running processes like shells with opam config exec -- bash or similar because the shell's environment is not precisely the same as the parent process's environment. In partiular, the absence of OPAMSWITCH was not preserved and therefore the use of interactive opam commands was more unwieldy.

Using opam config exec to spawn a shell is a common technique when scripting with opam in order to avoid needing to run a separate command to set up the environment in a subshell. See http://lists.ocaml.org/pipermail/opam-devel/2016-February/001393.html.

…WITCH

Previously, opam config exec would always set the OPAMSWITCH environment
variable. This causes issues when running processes like shells with
`opam config exec -- bash` or similar because the shell's environment
is not precisely the same as the parent process's environment. In partiular,
the absence of OPAMSWITCH was not preserved and therefore the use of
interactive opam commands was more unwieldy.
@dsheets dsheets mentioned this pull request Feb 23, 2016
@AltGr
Copy link
Member

AltGr commented Feb 24, 2016

Great, thanks!

AltGr added a commit that referenced this pull request Feb 24, 2016
opam config exec now does not set OPAMSWITCH unless --switch or OPAMSWITCH
@AltGr AltGr merged commit 70e13de into ocaml:master Feb 24, 2016
AltGr added a commit that referenced this pull request Feb 24, 2016
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.

None yet

2 participants