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

Fix mangling of PATH during cygvoke #5293

Merged
merged 1 commit into from
Sep 21, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions master_changes.md
Original file line number Diff line number Diff line change
Expand Up @@ -301,6 +301,7 @@ users)
* Permissions: chmod+unlink before copy [#4827 @jonahbeckford @dra27]
* Support MSYS2: two-phase rsync on MSYS2 to allow MSYS2's behavior of copying rather than symlinking [#4817 @jonahbeckford]
* Environment: translate PATH from Windows to Unix during opam env. [#4844 @jonahbeckford]
* Correct invocation of Cygwin binaries when Cygwin bin directory is first in PATH [#5293 @dra27]

## Test
* Update crowbar with compare functions [#4918 @rjbou]
Expand Down
4 changes: 2 additions & 2 deletions src/core/opamProcess.ml
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ let cygwin_create_process_env prog args env fd1 fd2 fd3 =
end else
Some (key ^ "=" ^ String.concat " " settings)
| "path" ->
let path_dirs = OpamStd.Sys.split_path_variable item in
let path_dirs = OpamStd.Sys.split_path_variable value in
let winsys = Filename.concat (OpamStd.Sys.system ()) "." |> String.lowercase_ascii in
let rec f prefix suffix = function
| dir::dirs ->
Expand All @@ -175,7 +175,7 @@ let cygwin_create_process_env prog args env fd1 fd2 fd3 =
| [] ->
assert false
in
Some (String.concat ";" (f [] [] path_dirs))
Some (key ^ "=" ^ String.concat ";" (f [] [] path_dirs))
| _ ->
Some item in
let env = OpamStd.List.filter_map f env in
Expand Down