Modify .pc files in place on Windows#426
Modify .pc files in place on Windows#426voegelas wants to merge 1 commit intoPerlAlien:mainfrom voegelas:edit-with-path-tiny
Conversation
Path::Tiny's edit method creates temporary files, which may fail on GitHub's Windows runner images. Modifying pkg-config style .pc files using slurp and append works fine.
|
There is a reason this isn't the normal way edit works; the file will be incomplete while it is being created, and could be corrupted if the edit process fails to complete. |
|
|
|
There is no way for append to know whether it will successfully complete the write before it truncates the existing file, that is why it is susceptible to failure; the temporary file is an atomic operation. It may be rare, but my opinion is that it is not worthwhile to introduce to every distribution using this to solve some issue with windows CI runners. |
|
(that is not to say it is my call, but I just want to make the impact clear) |
Path::Tiny's
editmethod creates temporary files, which may fail on GitHub's Windows runner images. Modifying pkg-config style .pc files usingslurpandappendworks fine. Fixes #425.