Skip to content

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

Merged
weitzman merged 2 commits into11.xfrom
deploy-deploy
Sep 3, 2022
Merged

Fix execution of deploy hooks inside a module with _deploy in the name.#5217
weitzman merged 2 commits into11.xfrom
deploy-deploy

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