Code Review
/
puppet-modules
/
puppetlabs-apt.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
Revert "MODULES-10548: make files readonly"
[puppet-modules/puppetlabs-apt.git]
/
tasks
/
init.rb
diff --git
a/tasks/init.rb
b/tasks/init.rb
index b4cb0dc7622744be6334972eeb720ae1d89faf08..3cd20d49736f7017d601744e233b245db296cdf3 100755
(executable)
--- a/
tasks/init.rb
+++ b/
tasks/init.rb
@@
-5,9
+5,9
@@
require 'puppet'
def apt_get(action)
cmd = ['apt-get', action]
def apt_get(action)
cmd = ['apt-get', action]
- cmd << '-y' if
action == 'upgrade'
+ cmd << '-y' if
['upgrade', 'dist-upgrade', 'autoremove'].include?(action)
stdout, stderr, status = Open3.capture3(*cmd)
stdout, stderr, status = Open3.capture3(*cmd)
- raise Puppet::Error, stderr if status != 0
# rubocop:disable GetText/DecorateFunctionMessage
+ raise Puppet::Error, stderr if status != 0
{ status: stdout.strip }
end
{ status: stdout.strip }
end