Skip to content

Commit

Permalink
fix providing single service to service task
Browse files Browse the repository at this point in the history
  • Loading branch information
preaction committed Jan 5, 2018
1 parent 842c705 commit bb71ecb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Rexfile
Original file line number Diff line number Diff line change
Expand Up @@ -1027,8 +1027,8 @@ task service =>
sub {
my ( $opt ) = @_;
my $command = $opt->{command} || 'restart';
my @services = split( /,/, $opt->{services} ) || '*';

my @services = split( /,/, $opt->{services} );
@services = ( '*' ) if !@services;
my $services = join " ", map { '~cpantesters/service/' . $_ } @services;
my $line = sprintf( 'sudo -u cpantesters sv %s %s', $command, $services );
Rex::Logger::info( 'Running: ' . $line );
Expand Down

0 comments on commit bb71ecb

Please sign in to comment.