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
cwd = Dir.pwd
is_success = false
# Change to a tmp dir when compiling so we don't litter compiler artifacts
Dir.mktmpdir do |tmpdir|
Dir.chdir tmpdir
sh(command, infile.path, verbose: false) { |retval, _| is_success = retval }
end
tmpdir = Dir.mktmpdir
Dir.chdir tmpdir
sh(command, infile.path, verbose: false) { |retval, _| is_success = retval }
infile.delete
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
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