Skip to content

Commit

Permalink
Fix RexOps#1508 simply by correcting typo on a couple lines
Browse files Browse the repository at this point in the history
Notice that how params and args were mixed up (interchanged)
when being passed down  -- within the needs() function.

This appears to be a typo, introduced initially
by PR RexOps#1157 (the fix for RexOps#1066 ) with 48c737b.

CHANGES:
=============
modified: lib/Rex/Command.pm

HOW TO TEST :
=============

$ prove -v t/issue/1508.t   # for this issue
$ prove t/**/*.t            # for non-regression

While the related tests remain marked as "TODO",
they will not report failures during normal test runs.

To see their true pass/fail status, you have to pass
the '-v' option to `prove`.
  • Loading branch information
tabulon committed Sep 27, 2021
1 parent 97f9e9a commit 93a5135
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/Rex/Commands.pm
Original file line number Diff line number Diff line change
Expand Up @@ -1066,11 +1066,11 @@ sub needs {
my $suffix = $self . ":";
if ( @args && grep ( /^\Q$task_name\E$/, @args ) ) {
Rex::Logger::debug( "Calling " . $task_o->name );
$task_o->run( "<func>", params => \@task_args, args => \%task_opts );
$task_o->run( "<func>", params => \%task_opts, args => \@task_args );
}
elsif ( !@args ) {
Rex::Logger::debug( "Calling " . $task_o->name );
$task_o->run( "<func>", params => \@task_args, args => \%task_opts );
$task_o->run( "<func>", params => \%task_opts, args => \@task_args );
}
}

Expand Down

0 comments on commit 93a5135

Please sign in to comment.