acquia / blt

Acquia's toolset for automating Drupal 8 and 9 development, testing, and deployment.
https://docs.acquia.com/blt/
GNU General Public License v2.0
442 stars 394 forks source link

BLT-5207: BLT excludes drush/Commands/custom #4666

Closed jcnventura closed 1 year ago

jcnventura commented 1 year ago

Describe the bug As per Drupal's recommended-project, any contrib drush command should be installed by composer in drush/Commands/contrib (see https://github.com/drupal/recommended-project/blob/9.1.x/composer.json#L46).

Logic follows that when adding a custom Drush command, it should be placed in drush/Commands/custom, and BLT should then deploy that custom command when building the artifact. Unfortunately, BLT's default deploy-exclude.txt excludes instead the entire drush/Commands directory, thus removing any custom Drush command from deployment.

To Reproduce Steps to reproduce the behavior, ideally starting from a fresh install of BLT:

  1. Run composer create-project acquia/drupal-recommended-project --no-interaction
  2. Add a custom Drush command to drush/Commands/custom
  3. Run blt artifact:deploy to deploy the site to Acquia
  4. Check that the entire drush/Commands folder is excluded

Expected behavior I would expect that only the composer-installed drush/Commands/contrib directory was excluded.

Detailed error output There's no error log.

BLT doctor output +-----------------------+--------------------------------------------+ | Property | Value | +-----------------------+--------------------------------------------+ | %paths.%root | /var/www/html/docroot | | %paths.%site | sites/default | | %paths.%modules | sites/all/modules | | %paths.%themes | sites/all/themes | | %paths.%config-sync | /var/www/html/config/default | | %paths.%files | sites/default/files | | %paths.%temp | /tmp | | %paths.%private | sites/default/private | | admin-theme | seven | | alias-searchpaths.0 | /var/www/html/drush/sites | | blt-version | 13.4.0.0 | | bootstrap | Successful | | composer-version | Composer version 2.5.4 2023-02-15 13:10:06 | | config-sync | /var/www/html/config/default | | db-driver | mysql | | db-hostname | db | | db-name | db | | db-password | db | | db-port | 3306 | | db-status | Connected | | db-username | db | | drupal-settings-file | sites/default/settings.php | | drupal-version | 9.5.3 | | drush-alias-files.0 | /var/www/html/drush/sites/sharpeu.site.yml | | drush-cache-directory | /home/jcv/.drush/cache | | drush-conf.0 | /var/www/html/vendor/drush/drush/drush.yml | | drush-conf.1 | /var/www/html/drush/drush.yml | | drush-script | /var/www/html/vendor/bin/drush | | drush-temp | /tmp | | drush-version | 10.6.2 | | files | sites/default/files | | install-profile | minimal | | modules | sites/all/modules | | php-bin | /usr/bin/php7.4 | | php-conf.1 | /etc/php/7.4/cli/php.ini | | php-os | Linux | | private | sites/default/private | | root | /var/www/html/docroot | | site | sites/default | | temp | /tmp | | theme | sharp | | themes | sites/all/themes | | uri | https://sharp-website.ddev.site | +-----------------------+--------------------------------------------+ +--------------------------------------+--------------------------------------------------------------+ | Check | Problem | +--------------------------------------+--------------------------------------------------------------+ | NodeCheck:checkNodeVersionFileExists | Neither .nvmrc nor .node-version file found in repo root. | | SettingsFilesCheck:local-settings | Could not find local settings file. | | | Your local settings file should exist at | | | /var/www/html/docroot/sites/default/settings/local.settings. | | | php. | +--------------------------------------+--------------------------------------------------------------+

System information

Additional context Add any other context about the problem here.