You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The reason is that the shell hook resets OPAMSWITCH to the empty string as soon as it is set. This is because opam env --shell=zsh --readonly (my shell is zsh) prints OPAMSWITCH=''; export OPAMSWITCH; as the first line.
Before, the same command did not print OPAMSWITCH. This seems to be a consequence of #5417.
The text was updated successfully, but these errors were encountered:
I turned off the shell hook to experiment. By default, opam env --shell=zsh --readonly 2> /dev/null <&- does not mention OPAMSWITCH. But if I type eval $(opam env --set-switch --switch switch2) (while global switch is switch1), opam env --shell=zsh --readonly 2> /dev/null <&- contains as the first line OPAMSWITCH=''; export OPAMSWITCH;.
If I just set OPAMSWITCH manually, this does not happen (but then I have an unsynchronized environment, and, strangely, this not not reported by opam).
The reason is that the shell hook resets
OPAMSWITCH
to the empty string as soon as it is set. This is becauseopam env --shell=zsh --readonly
(my shell is zsh) printsOPAMSWITCH=''; export OPAMSWITCH;
as the first line.Before, the same command did not print
OPAMSWITCH
. This seems to be a consequence of #5417.The text was updated successfully, but these errors were encountered: