On my dev boxes I use to own files with my user and group www-data, so I can run drush without sudoing.

When installing composer_manager I got 'RuntimeException' with message 'public://composer/composer.json is not writable, but the file was writable. Tried removing it so I could regenerate it, same problems.

is_writable() php function does not verify all the possible conditions. In core, file_save_htaccess and similar functions rely on the return of file_put_contents, maybe we should do the same here.

CommentFileSizeAuthor
#1 2401933-1.patch552 bytespenyaskito

Comments

penyaskito’s picture

Status: Active » Needs review
StatusFileSize
new552 bytes

This worked for me.

JulienD’s picture

Status: Needs review » Reviewed & tested by the community

Hi,

Enabling composer_manager to a freshly installed Drupal 8 from the Git repository results to an error page.

RuntimeException : public://composer/composer.json is not writable. dans Drupal\composer_manager\ComposerFile->write() (ligne 109 dans /home/vagrant/data/drupal-commerce-dev/modules/composer_manager/src/ComposerFile.php).

This patch fixes the issue and allow composer_manager to be properly installed. Thanks @penyaskito

bojanz’s picture

Status: Reviewed & tested by the community » Fixed

Committed, thanks!

  • bojanz committed 0016ea6 on 8.x-1.x authored by penyaskito
    Issue #2401933 by penyaskito: Writing public://composer/composer.json...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.