Skip to content

Remove hack for FileUtils.mv due to incorrect error raised from File.rename#5168

Merged
headius merged 3 commits intomasterfrom
fu_mv_exdev
May 13, 2018
Merged

Remove hack for FileUtils.mv due to incorrect error raised from File.rename#5168
headius merged 3 commits intomasterfrom
fu_mv_exdev

Conversation

@headius
Copy link
Member

@headius headius commented May 13, 2018

In MRI, File.rename will raise an EXDEV if the rename is attempted with paths that span devices (mounts). Up until this PR, we would raise EACCES in such a situation, requiring us to modify fileutils.rb to deal with both errors.

Because this is tweaking a very core behavior of File and FileUtils, I'm pushing to a branch to see how it affects our test runs.

This fix is an attempt to deal with at least part of Bundler's vendoring of a non-JRuby fileutils.rb. See rubygems/bundler#6532.

headius added 3 commits May 13, 2018 15:20
This fix is needed because Bundler now vendors an MRI version of
fileutils that does not include our hacks for the incorrect EACCES
error. That is a larger issue since there's other hacks we have
not eliminated, but this fixes a primary issue bundling libraries.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant