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

(PDK-1169) Add VMWare fallback to PDK::Util::Filesystem.mv #802

Merged
merged 1 commit into from
Nov 15, 2019

Conversation

rodjek
Copy link
Contributor

@rodjek rodjek commented Nov 14, 2019

File.rename (used inside of FileUtils.mv) raises Errno::ENOENT
when used inside of a VMWare shared folder on Windows. This adds
a fallback to PDK::Util::Filesystem.mv that first checks if the source
file exists (in case the error is legitimate) and then "moves" the file
using copy and remove operations.

As this is quite the corner case, there are no tests added but I've
tested it on a local VM and it resolves the issue.

`File.rename` (used inside of `FileUtils.mv`) raises `Errno::ENOENT`
when used inside of a VMWare shared folder on Windows. This adds
a fallback to `PDK::Util::Filesystem.mv` that first checks if the source
file exists (in case the error is legitimate) and then "moves" the file
using copy and remove operations.

As this is quite the corner case, there are no tests added but I've
tested it on a local VM and it resolves the issue.
@coveralls
Copy link

coveralls commented Nov 14, 2019

Coverage Status

Coverage remained the same at 91.79% when pulling ee2a36c on rodjek:pdk-1169 into f5fdf1a on puppetlabs:master.

@glennsarti
Copy link
Contributor

@rodjek This looks like a manifestation of jruby/jruby#5168

@glennsarti
Copy link
Contributor

i.e. can't rename across filesystems

Copy link
Contributor

@scotje scotje left a comment

Choose a reason for hiding this comment

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

Seems reasonable to me!

@rodjek rodjek merged commit 27b6d81 into puppetlabs:master Nov 15, 2019
@rodjek rodjek deleted the pdk-1169 branch November 15, 2019 00:28
@rodjek rodjek added the bug label Dec 13, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants