deployer icon indicating copy to clipboard operation
deployer copied to clipboard

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

Open SimJoSt opened this issue 2 years ago • 0 comments

  • Deployer version: https://github.com/deployphp/deployer/releases/tag/v7.3.1
  • Deployment OS: macOS

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

  • We're using Polar.sh so you can upvote and help fund this issue.
  • We receive the funding once the issue is completed & confirmed by you.
  • Thank you in advance for helping prioritize & fund our backlog.
Fund with Polar

SimJoSt avatar Sep 22 '23 17:09 SimJoSt