Merge pull request #792 from eimlav/stringify
[puppet-modules/puppetlabs-apt.git] / tasks / init.rb
index d256468b64a739fdaa6446f49b1d5069bc46891d..b4cb0dc7622744be6334972eeb720ae1d89faf08 100755 (executable)
@@ -5,9 +5,9 @@ require 'puppet'
 
 def apt_get(action)
   cmd = ['apt-get', action]
-  cmd << ' -y' if action == 'upgrade'
+  cmd << '-y' if action == 'upgrade'
   stdout, stderr, status = Open3.capture3(*cmd)
-  raise Puppet::Error, stderr if status != 0
+  raise Puppet::Error, stderr if status != 0 # rubocop:disable GetText/DecorateFunctionMessage
   { status: stdout.strip }
 end