Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
When using a native Windows opam.exe the PATH from
opam env
is in Windows format.PowerShell output from
opam env
:$env:PATH = 'Z:\source\opam\_opam\bin;...'
CMD.exe output from
opam env
:SET PATH=Z:\source\opam\_opam\bin;...
With this change both MSYS2 and Cygwin will Unix-ize the PATH with essentially
cygpath --path $PATH
.Cygwin output from
opam env
:PATH='/cygdrive/c/Users/beckf/AppData/Local/opam/diskuv-boot-DO-NOT-DELETE/bin:...'
MSYS2 output from
opam env
:PATH='/z/source/opam/_opam/bin:...'
cygpath --path
on an already Unix PATH is idempotent, so a Cygwin opam.exe will still work after this change. That is, the following says "MATCHES" on both Cygwin and MSYS2:This PR gets
eval $(opam env)
working from a native Windows opam.exe into a MSYS2 shell. However the same command in a Cygwin shell chokes with-bash: $'\r': command not found
because native Windows opam.exe prints carriage returns (which MSYS2 eval can handle, but not Cygwin). I don't actually know a clean fix for that, and I suspect removing carriage returns when in MSYS2/Cygwin probably belongs in another PR.