deployer icon indicating copy to clipboard operation
deployer copied to clipboard

Filtered tasks with ->select() display in task output.

Open leevigraham opened this issue 3 years ago • 2 comments

  • Deployer version: v7.0.0-rc.8
  • Deployment OS: OSX

vendor/bin/deployer.phar deploy --plan all shows the feature host with craft:deploy:prepare.

When I run vendor/bin/deployer.phar deploy stage the task craft:deploy:prepare appears in the list of tasks… although I'm not actually sure anything is run because there is nothing output in verbose mode.

craft:deploy:prepare should only be shown when it's actually run.

Plan vs output

image

Output in debug mode (stage):

Screen Shot 2022-05-26 at 10 26 10 am

Output in debug mode (feature):

Screen Shot 2022-05-26 at 10 29 03 am

<?php

namespace Deployer;

require __DIR__ .'/config/bootstrap.php';
require 'recipe/composer.php';

set('application', 'craft-boilerplate');

set('repository', '[email protected]:newism/[redacted].git');
set('branch', 'main');

host('feature')
    ->set('hostname', 'xxx.xxx.xxx.xx')
    ->set('remote_user', 'forge')
    ->set('deploy_path', '/home/forge/[redacted]/feature')
    ->set('php_version', '8.0')
    ->set('cachetool', '/run/php/php8.0-fpm.sock')
;

host('stage')
    ->set('hostname', 'xxx.xxx.xxx.xx')
    ->set('remote_user', 'forge')
    ->set('deploy_path', '/home/forge/[redacted]/stage')
    ->set('php_version', '8.0')
    ->set('cachetool', '/run/php/php8.0-fpm.sock')
;

host('production')
    ->set('hostname', 'xxx.xxx.xxx.xx')
    ->set('remote_user', 'forge')
    ->set('deploy_path', '/home/forge/[redacted]/prod')
    ->set('php_version', '8.0')
    ->set('cachetool', '/run/php/php8.0-fpm.sock')
;

after('deploy:failed', 'deploy:unlock');

task('deploy:vendors')->addAfter('craft:deploy:prepare');

desc('Run craft setup scripts');
task('craft:deploy:prepare', function () {
    run('ls -la');
})->select('feature');

leevigraham avatar May 26 '22 00:05 leevigraham

Additionally when running a filtered task directly the process does not end and has to be quit manually.

image

leevigraham avatar May 26 '22 00:05 leevigraham

Can confirm, having the same issue

jooojooow avatar Jun 01 '22 09:06 jooojooow