Code Review
/
puppet-modules
/
puppetlabs-apt.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
review
|
tree
raw
|
patch
| inline |
side by side
(from parent 1:
cef5627
)
Fix "E: Unable to locate package -y"
author
Arnout Boks
<arnoutboks@gmail.com>
Mon, 5 Mar 2018 11:55:45 +0000
(12:55 +0100)
committer
GitHub
<noreply@github.com>
Mon, 5 Mar 2018 11:55:45 +0000
(12:55 +0100)
Due to the extra space, apt complained with "Unable to locate package -y". Without the extra space, the task runs fine.
tasks/init.rb
patch
|
blob
|
history
diff --git
a/tasks/init.rb
b/tasks/init.rb
index d256468b64a739fdaa6446f49b1d5069bc46891d..ebcf72adddee590f91516a756b07aadeccb16857 100755
(executable)
--- a/
tasks/init.rb
+++ b/
tasks/init.rb
@@
-5,7
+5,7
@@
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
{ status: stdout.strip }