Unverified Commit 2b05cf48 authored by Rory OConnell's avatar Rory OConnell Committed by Yukihiro "Matz" Matsumoto

Work around removing tmp dir

parent dae0de44
...@@ -134,13 +134,13 @@ module MRuby ...@@ -134,13 +134,13 @@ module MRuby
cwd = Dir.pwd cwd = Dir.pwd
is_success = false is_success = false
# Change to a tmp dir when compiling so we don't litter compiler artifacts # Change to a tmp dir when compiling so we don't litter compiler artifacts
Dir.mktmpdir do |tmpdir| tmpdir = Dir.mktmpdir
Dir.chdir tmpdir Dir.chdir tmpdir
sh(command, infile.path, verbose: false) { |retval, _| is_success = retval } sh(command, infile.path, verbose: false) { |retval, _| is_success = retval }
end
infile.delete infile.delete
Dir.chdir cwd Dir.chdir cwd
# Some systems strangely do not allow removing a temp dir after creation
FileUtils.remove_entry(tmpdir) rescue Errno::EACCES
return is_success return is_success
end end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment