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 copying framework when building a new version #84

Open
wants to merge 11 commits into
base: master
Choose a base branch
from

Conversation

kylefleming
Copy link

@kylefleming kylefleming commented Jul 11, 2019

Fixes an issue where copying the generated framework after a build would fail if the framework already exists in the GeneratedFrameworks folder, even if that existing framework is out-of-date.

This issue is caused by FileUtils.mv exibiting different behavior for files than for directories. If the destination already exists and is a file then :force => true causes FileUtils.mv to remove the destination and proceed with the move as expected. However, if the destination already exists and is a directory, then FileUtils.mv raises an error and by specifying the :force => true flag, that error is swallowed. This effectively results in a silent failure of the FileUtils.mv command if the destination already exists and is a directory (yet works as expected if it's a file).

Note: This PR is built on top of #103. I'll rebase this PR when that gets merged (or another fix for travis builds is committed).

@kylefleming kylefleming force-pushed the fix/rebuilding-frameworks branch 2 times, most recently from 153e2f6 to 0ebf099 Compare July 12, 2019 01:20
@kylefleming
Copy link
Author

I believe this addresses #83 (and #38 as well, even though the issue was closed).

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.

2 participants