Skip to content

Commit

Permalink
Fix RexOps#1508 w/ some code cleanup. All tests still pass.
Browse files Browse the repository at this point in the history
  • Loading branch information
tabulon committed Sep 26, 2021
1 parent 1ad99f4 commit fc1d6b9
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions lib/Rex/Commands.pm
Original file line number Diff line number Diff line change
Expand Up @@ -1064,11 +1064,7 @@ sub needs {
my $task_o = $tl->get_task($task);
my $task_name = $task_o->name;
my $suffix = $self . ":";
if ( @args && grep ( /^\Q$task_name\E$/, @args ) ) {
Rex::Logger::debug( "Calling " . $task_o->name );
$task_o->run( "<func>", params => \%task_opts, args => \@task_args );
}
elsif ( !@args ) {
if ( !@args or @args && grep ( /^\Q$task_name\E$/, @args ) ) {
Rex::Logger::debug( "Calling " . $task_o->name );
$task_o->run( "<func>", params => \%task_opts, args => \@task_args );
}
Expand Down

0 comments on commit fc1d6b9

Please sign in to comment.