Hi Folks,

Just like the title says, drush basic-install is broken in Drupal 8.8.x and will error out with the following:

Destination directory / is not writable.
Failed to copy themes/basic to /my_theme.

It occurred to me that it might be a core issue so I installed Drupal 8.6.18 and found that the install works fine. I haven't looked into the issue any further but I assume that a function or method being used in the install has been deprecated or broken. If I find anything further I'll update.

Note this affects Versions 8.x-1.x and 8.x-2.x

Cheers,
Andrew

Comments

awasson created an issue. See original summary.

awasson’s picture

I've resolved this. I'll provide a patch shortly.

awasson’s picture

Assigned: Unassigned » awasson
Status: Active » Needs review

The issue is a result of file_directory_temp() is deprecated and moved to the FileSystem service in the Drupal 8.8.x update. Here's the change record: https://www.drupal.org/node/3039255

To resolve it, I just had to change one line in the drush install command. I've attached a patch.

I haven't tested it in earlier versions of Drupal 8 so I'll spend some time looking at that this afternoon.

Cheers,
Andrew

awasson’s picture

awasson’s picture

StatusFileSize
new715 bytes

I did some testing on older versions of Drupal 8 and found that the installer crashed because surprise, surprise the new method doesn't exist. I've added replacement patch that includes a conditional to check to see if the new method is available and it will work on pre Drupal 8.8.x as well as the latest.

Cheers,
Andrew

awasson’s picture

Status: Needs review » Needs work

Sorry... Needs work still. My conditional is faulty. Works on old, not new.

I'll be back once I've done some more work on it and I know it's solid.

Andrew

awasson’s picture

Status: Needs work » Needs review
StatusFileSize
new721 bytes

Ok... That was painful.

I've attached the patch that actually resolves the issue and that is backwards compatible with less than Drupal 8.8.x core.

Cheers,
Andrew

  • joelpittet committed 969a3a1 on 8.x-1.x authored by awasson
    Issue #3130098 by awasson: drush basic-install is broken in Drupal 8.8.x
    
joelpittet’s picture

Version: 8.x-2.0 » 8.x-2.x-dev

Thanks for posting the CR that is related to and the patch, I fixed some minor coding standard spacing fixes on commit.

  • joelpittet committed 307a084 on 8.x-2.x authored by awasson
    Issue #3130098 by awasson: drush basic-install is broken in Drupal 8.8.x
    
joelpittet’s picture

Assigned: awasson » Unassigned
Status: Needs review » Fixed
Issue tags: -drupal core

Status: Fixed » Closed (fixed)

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