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 env does not recalculate all paths correctly when local switch is moved #5423

Open
yawaramin opened this issue Jan 21, 2023 · 1 comment

Comments

@yawaramin
Copy link
Contributor

Steps to reproduce:

$ pwd
/Users/yawar/src
$ mkdir reloc
$ cd reloc
$ opam switch create . 4.14.1
$ opam env

Output shows all paths starting with /Users/yawar/src/reloc/_opam, which is correct. But then if we move the directory:

$ cd ..
$ mv reloc reloc2
$ cd reloc2
$ opam env

Output shows that only OPAM_SWITCH_PREFIX is recalculated correctly i.e. /Users/yawar/src/reloc2/_opam. The paths in the other variables (CAML_LD_LIBRARY_PATH, OCAML_TOPLEVEL_PATH, PATH) all still start with /Users/yawar/src/reloc/_opam.

Expected behaviour: opam should leverage the correct OPAM_SWITCH_PREFIX value and interpolate it into the other variables.

@dra27
Copy link
Member

dra27 commented Jan 21, 2023

See #3411, #3413 and #5417 🙂

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

No branches or pull requests

2 participants