Open Chimrod opened 5 months ago
Can I double-check which version of opam you're using? Also, what's the output - before sourcing env_hook.fish
of opam env
itself?
I have a similar error with Opam2.2.1 and bash.
My /cygdrive/c/Users/frede/AppData/Local/opam/opam-init/variables.sh
is updated by opam switch
, but fails to use Cygwin conventions.
The PATH lines of this script are:
# Updated by package mingw-w64-shims
PATH='C:\Cygwin\usr\x86_64-w64-mingw32\sys-root\mingw\bin':"$PATH"; export PATH;
# Updated by package mingw-w64-shims
PATH='':"$PATH"; export PATH;
# Binary dir for opam switch 5.1.0
PATH='C:\Users\frede\AppData\Local\opam\5.1.0\bin':"$PATH"; export PATH;
The end result is a .
in the PATH which prevents ocamlfind
to install (the ./INSTALL
file is found instead of /usr/bin/install
). I guess the .
comes from a env_hook.sh
and variable.sh
interaction. The mingw-w64-shims
part is weird (the null entry is considered as .
by bash).
I guess the mingw-w64-shims
part is generated by ./.opam-switch/packages/mingw-w64-shims.0.2.0/opam
which contains:
setenv: [
[PATH += "%{_:runtime-x86_64}%"]
[PATH += "%{_:runtime-i686}%"]
]
The first line adds a sensible PATH entry (excepted that there is no Cygwin convention conversion). The second fails to find runtime-i686 and add a null entry.
Note: the MANPATH is set correctly:
MANPATH="$MANPATH":'/cygdrive/c/Users/frede/AppData/Local/opam/5.1.0/man'; export MANPATH;
I have also opened the issue: https://github.com/dra27/mingw-w64-shims/issues/2
I’m using opam on windows, with the fish environement.
After the environment intialisation, my terminal broke, not reconignizing any basic commands like
ls
. After digging a bit, It look likes the path where replaced with a mix of unix and windows path.Path variable after sourcing