diff --git a/tasks/run.rb b/tasks/run.rb index 95e55c08..bdf429cf 100755 --- a/tasks/run.rb +++ b/tasks/run.rb @@ -142,7 +142,7 @@ def noop(params) end def environment(params) - (params['environment'].length > 1) ? "--environment=#{params['environment']}" : '' + (params['environment'] && !params['environment'].empty?) ? "--environment=#{params['environment']}" : '' end # Attempts to run the Puppet agent, returning the mtime for the last run report