Skip to content

Commit

Permalink
Update src/client/opamAction.ml
Browse files Browse the repository at this point in the history
Co-authored-by: David Allsopp <[email protected]>
  • Loading branch information
kit-ty-kate and dra27 authored Feb 15, 2024
1 parent 37eed83 commit 8a49cff
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/client/opamAction.ml
Original file line number Diff line number Diff line change
Expand Up @@ -542,7 +542,12 @@ let compilation_env t opam =
git_location ~comment:"Git binary path"]) @
let cygwin_env = match OpamStd.Env.getopt "CYGWIN" with
| None | Some "" -> "winsymlinks:native"
| Some prev -> "winsymlinks:native " ^ prev
| Some prev ->
let is_native s = (s = "winsymlinks:nativestrict" || s = "winsymlinks:native") in
if List.exists is_native (String.split_on_char ' ' prev) then
prev (* Either winsymlinks:native or winsymlinks:nativestrict already in CYGWIN *)
else
prev ^ " winsymlinks:native" (* Override any other setting *)
in
[ OpamTypesBase.env_update_resolved "CYGWIN" Eq cygwin_env
~comment:"winsymlinks:native" ]
Expand Down

0 comments on commit 8a49cff

Please sign in to comment.