wp-cli / export-command

Exports WordPress content to a WXR file.
MIT License
12 stars 27 forks source link

Non-writable directory not identified as such #52

Closed johnbillion closed 5 years ago

johnbillion commented 5 years ago

When attempting to write an export to a directory that WP-CLI cannot write to, no warning is shown and the export is reported as successful.

Starting export process...
PHP Warning:  fopen(/srv/www/<snip>.xml): failed to open stream: Permission denied in phar:///usr/bin/wp/vendor/wp-cli/export-command/src/WP_Export_Split_Files_Writer.php on line 61
Warning: fopen(/srv/www/<snip>.xml): failed to open stream: Permission denied in phar:///usr/bin/wp/vendor/wp-cli/export-command/src/WP_Export_Split_Files_Writer.php on line 61
Success: All done with export.
schlessera commented 5 years ago

This needs a check and should throw an error when the target folder/file is not writable.

nickdavis commented 5 years ago

Looking at this