liamnichols / xcstrings-tool

A plugin to generate Swift constants for your Strings Catalogs.
https://swiftpackageindex.com/liamnichols/xcstrings-tool/documentation/documentation
MIT License
134 stars 24 forks source link

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

Closed hiragram closed 4 months ago

hiragram commented 4 months ago

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?