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

Stop using mv and switch to robocopy on Windows #5438

Closed
wants to merge 2 commits into from

Conversation

dra27
Copy link
Member

@dra27 dra27 commented Feb 7, 2023

Lots to clean-up in this, obviously. Overlaps with #4823 and #3217.

This PR is enough in #5220 to run opam init without Cygwin pre-installed.

@@ -109,8 +109,10 @@ let exec dirname ?env ?name ?metadata ?keep_going cmds =
(fun () -> OpamSystem.commands ?env ?name ?metadata ?keep_going cmds)

let move_dir ~src ~dst =
OpamSystem.command ~verbose:(OpamSystem.verbose_for_base_commands ())
[ "mv"; Dir.to_string src; Dir.to_string dst ]
(* XXX Windows - destination must be on the same drive or this fails *)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isn’t that the same behaviour as on Unix? Sys.rename (morrally) uses Unix.rename afaik

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It was a note to check - the implementation is slightly complicated, and I just had a lingering memory that there's something more irritating about it on Windows than on Unix 🙂

@dra27 dra27 force-pushed the no-mv branch 4 times, most recently from 3dc49ba to ad5df9d Compare February 8, 2023 14:35
@rjbou rjbou self-assigned this Mar 14, 2023
@rjbou rjbou mentioned this pull request Mar 14, 2023
16 tasks
@rjbou rjbou added this to the 2.2.0~alpha milestone Mar 22, 2023
@kit-ty-kate
Copy link
Member

Superseded by #4823

@kit-ty-kate kit-ty-kate closed this May 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants