publish-crates: avoid cleaning up the tmp folder on CI#32
publish-crates: avoid cleaning up the tmp folder on CI#32joao-paulo-parity merged 1 commit intoparitytech:masterfrom
Conversation
|
Why not running |
I thought of implementing a workaround, but I stopped myself precisely because it would not be more concise; on the contrary, more code would be added for handling the "problem" - which is actually not a problem because the directory doesn't need to be cleaned up on CI. It seemed sensible to sidestep the procedure rather than add more code for handling what's effectively a non-issue for CI environments. Indeed, the situation is not solved for non-CI environments. To reiterate:
Regardless, I've created a ticket for enhancing this part of the script such that it also behaves well on non-CI environments (although I doubt it'll ever be used that way). |
The
rm: cannot remove XXX: Directory not emptymessage is misleading. The error occurs not because the directory has something in it, but because some process is attached to a file within the directory, which makes it so it cannot be removed. See for instance https://stackoverflow.com/questions/64852408/cannot-remove-git-directory-not-empty.On CI it's not necessary to clean up the temporary folder because it'll be discarded automatically once the job runner exits. The error can still happen for non-CI environments, but I'll punt on handling that for now because the script is not supposed to be run outside of CI (there's a clear warning about that in the comment at the start of the script).
closes #31