Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix execution of deploy hooks inside a module with _deploy in the name. #5217

Merged
merged 2 commits into from Sep 3, 2022

Conversation

pfrenssen
Copy link
Member

Fixes #5216

@pfrenssen pfrenssen changed the title Test execution of deploy hooks inside a module with _deploy in the name. Fix execution of deploy hooks inside a module with _deploy in the name. Aug 30, 2022
@pfrenssen
Copy link
Member Author

Interesting that this is working on Appveyor. On linux the test fails correctly:

$ composer functional -- --filter testDeployHooksInModuleWithDeployInName
[...]
1) Unish\DeployHookTest::testDeployHooksInModuleWithDeployInName
Exception: Unexpected exit code 1 (expected 0) for command:
/home/pieter/drush/vendor/drush/drush/drush --uri=dev --no-interaction deploy:hook --yes/home/pieter/drush/vendor/drush/drush/drush --uri=dev --no-interaction deploy:hook --yes

Exit Code: 1(General error)

Working directory: /home/pieter/drush/vendor/drush/drush

Output:
================
 -------- ----------------- -------------------------------------------
  Module   Hook              Description
 -------- ----------------- -------------------------------------------
  woot     deploy_function   Deploy hook in module containing _deploy.
 -------- ----------------- -------------------------------------------


 // Do you wish to run the specified pending deploy hooks?: yes.



Error Output:
================
>  [warning] Deploy hook function woot_deploy_deploy_function not found in file woot.deploy.php
>  [error]  Deploy hook failed: woot_deploy_deploy_function
 [error]  Update aborted by: woot_deploy_deploy_function
 [error]  Finished performing deploy hooks.


/home/pieter/drush/vendor/drush/drush/src/TestTraits/CliTestTrait.php:158
/home/pieter/drush/vendor/drush/drush/tests/unish/CommandUnishTestCase.php:102
/home/pieter/drush/vendor/drush/drush/tests/functional/DeployHookTest.php:108
phpvfscomposer:///home/pieter/drush/vendor/drush/drush/vendor/phpunit/phpunit/phpunit:97

@trent-crawford
Copy link

@pfrenssen has requested that I review this fix as we are working on the same project. I have reviewed code and it looks good and I confirm that this pull request has fixed our project pipeline.

@weitzman
Copy link
Member

LGTM. @bircher - look ok to you?

@weitzman weitzman merged commit 5f9ca1c into 11.x Sep 3, 2022
@weitzman weitzman deleted the deploy-deploy branch September 3, 2022 13:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Deploy hook not found when module name contains _deploy
3 participants