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

Disable use of auxiliary file to prevent permission error on XcodeCloud #36

Merged
merged 1 commit into from
Jan 7, 2024

Conversation

hiragram
Copy link
Contributor

@hiragram hiragram commented Jan 5, 2024

fixes #35

In XcodeCloud environment, file system seems more strict than local machine.

xcstrings-tool implementation uses try someString.write(to: outputURL, atomically: true, encoding: .utf8) to write generated contents to file.
When atomically is true , contents will be written to intermediate file and then file will be moved to outputURL . But XcodeCloud seems to deny file writes outside of pluginWorkDirectory even if it is temporary file made by Foundation framework.

The easiest way to prevent this error is making atomically to be false if atomicity is not very important.

What do you think of it?

Copy link
Owner

@liamnichols liamnichols left a comment

Choose a reason for hiding this comment

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

Amazing find! Thank you so much for figuring this out 🙏 🙌

@liamnichols liamnichols merged commit 1fe6f1a into liamnichols:main Jan 7, 2024
2 checks passed
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.

Permission error in Xcode Cloud
2 participants