composer-stager icon indicating copy to clipboard operation
composer-stager copied to clipboard

Make "directory is writable" preconditions recursive

Open TravisCarden opened this issue 2 years ago • 1 comments

@tedbow our ActiveDirIsWritable and StagingDirIsWritable preconditions currently only test that the top level directories themselves are writable. Non-writable children and descendants therefore would not be caught until they actually cause failures during file syncing, potentially corrupting the codebase. I think we should make the checks recursive, even though that will make them slower. What do you think?

cc @phenaproxima @wimleers

TravisCarden avatar Feb 15 '23 21:02 TravisCarden

Personally, I'm +1 for this.

I think that, from a usefulness standpoint, performance is less important than correctness. Being able to detect problems before they happen is more valuable.

The one caveat I can think of here is that, in some cases, there are some directories that won't be writable, and shouldn't be writable, and will also be ignored by the staging operations. It would be good to be able to specify which paths should simply be ignored during permission checks.

phenaproxima avatar Feb 22 '23 15:02 phenaproxima