From: Arnout Boks Date: Mon, 5 Mar 2018 11:55:45 +0000 (+0100) Subject: Fix "E: Unable to locate package -y" X-Git-Tag: 5.0.0~15^2 X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=28c045c8df113eee86359a188a5a18a5317de3e1;hp=cef56276873b534415210abefd28454c321038c3;p=puppet-modules%2Fpuppetlabs-apt.git Fix "E: Unable to locate package -y" Due to the extra space, apt complained with "Unable to locate package -y". Without the extra space, the task runs fine. --- diff --git a/tasks/init.rb b/tasks/init.rb index d256468..ebcf72a 100755 --- 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 }