From 28c045c8df113eee86359a188a5a18a5317de3e1 Mon Sep 17 00:00:00 2001 From: Arnout Boks Date: Mon, 5 Mar 2018 12:55:45 +0100 Subject: [PATCH] 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. --- tasks/init.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 } -- 2.32.3