From bb71ecbd0aa14e759f759369c2beac5c08d208be Mon Sep 17 00:00:00 2001 From: Doug Bell Date: Fri, 5 Jan 2018 15:41:41 -0600 Subject: [PATCH] fix providing single service to service task --- Rexfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Rexfile b/Rexfile index bddb2ab..8085ef2 100644 --- a/Rexfile +++ b/Rexfile @@ -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 );