drupal-composer / preserve-paths

A composer plugin for keeping specified files and directories when installing/updating new composer packages. Can be used to supported nested packages.
28 stars 28 forks source link

Plugin fails when files owned by another user #23

Open zaporylie opened 6 years ago

zaporylie commented 6 years ago

chmod() returns error if files are owned by another user than one triggering composer command. That makes all file disappear (moved to composer cache folder) and never restored.

Maybe we should test if we can perform chmod() operation and fail early with information what have happened.

Ref. https://github.com/drupal-composer/preserve-paths/blob/7f99622800504c058e5230b63d3cd25809fa23ba/src/PathPreserver.php#L256