From 0ffd562ccac51caeabd28ecccd5105b89ab2c6e4 Mon Sep 17 00:00:00 2001 From: Roberto Alsina Date: Fri, 5 Jul 2024 12:05:51 -0300 Subject: [PATCH] Fix --- src/commands/build.cr | 6 ++---- src/daemon/funko.cr | 6 +++--- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/src/commands/build.cr b/src/commands/build.cr index b9b34d4..ac9a2c3 100644 --- a/src/commands/build.cr +++ b/src/commands/build.cr @@ -14,10 +14,8 @@ module Faaso funko.prepare_build(path: tmp_dir) if options["--local"] - funkos.each do |funko| - Log.info { "Building function... #{funko.name} in #{tmp_dir}" } - funko.build tmp_dir - end + Log.info { "Building function... #{funko.name} in #{tmp_dir}" } + funko.build tmp_dir else # Running against a server # Create a tarball for the funko buf = IO::Memory.new diff --git a/src/daemon/funko.cr b/src/daemon/funko.cr index acc4ff5..6e44f6d 100644 --- a/src/daemon/funko.cr +++ b/src/daemon/funko.cr @@ -58,8 +58,8 @@ module Funko tar.each_entry do |entry| dst = Path.new(tmp_dir, entry.name) Dir.mkdir_p dst.dirname - File.open(Path.new(tmp_dir, entry.name), "w") do |dst| - IO.copy entry.io, dst + File.open(Path.new(tmp_dir, entry.name), "w") do |outf| + IO.copy entry.io, outf end end end @@ -150,7 +150,7 @@ module Funko output: output, error: output, ) - Log.debug { "faaso output: #{output.to_s}" } + Log.debug { "faaso output: #{output}" } result = { "exit_code" => status.exit_code, "output" => output.to_s,