Cleanup tmp directory after build
This commit is contained in:
@ -16,6 +16,7 @@ module Faaso
|
||||
if options["--local"]
|
||||
Log.info { "Building function... #{funko.name} in #{tmp_dir}" }
|
||||
funko.build tmp_dir
|
||||
FileUtils.rm_rf(tmp_dir)
|
||||
next
|
||||
end
|
||||
Faaso.check_version
|
||||
@ -39,7 +40,7 @@ module Faaso
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
FileUtils.rm_rf(tmp_dir)
|
||||
tmp = File.tempname
|
||||
File.open(tmp, "w") do |outf|
|
||||
outf << buf
|
||||
|
@ -53,8 +53,9 @@ module Funko
|
||||
|
||||
# Build the thing
|
||||
run_faaso(["build", tmp_dir.to_s, "--no-runtime"], env)
|
||||
ensure
|
||||
FileUtils.rm_rf(tmp_dir) unless tmp_dir.nil?
|
||||
end
|
||||
|
||||
# Endpoints for the web frontend
|
||||
|
||||
# General status for the front page
|
||||
|
Reference in New Issue
Block a user