deployphp / deployer

The PHP deployment tool with support for popular frameworks out of the box
https://deployer.org
MIT License
10.63k stars 1.49k forks source link

Tasks `select()`s are merged like "OR" instead of being an "AND" condition #3700

Closed SimJoSt closed 2 months ago

SimJoSt commented 1 year ago

If a task is restricted to specific hosts with select() it will normally only run on these hosts. However, if it is invoked via a group task which itself has a different select() this will cause the task to be run on both sets of hosts, instead of running only on hosts that comply with both select()s. It appears an "OR" logic is used in the condition instead of "AND".

$ ./vendors/bin/dep group 
task('group', [
    'single'
])->select('env=prod');

task('single', function(){
    echo 'single';
})->select('env=dev');

Upvote & Fund

Fund with Polar

github-actions[bot] commented 2 months ago

This issue has been automatically closed. Please, open a discussion for bug reports and feature requests.

Read more: [https://github.com/deployphp/deployer/discussions/3888]