diff options
| author | Rory OConnell <[email protected]> | 2020-08-29 18:28:41 -0700 |
|---|---|---|
| committer | Yukihiro "Matz" Matsumoto <[email protected]> | 2020-10-12 18:20:13 +0900 |
| commit | 2b05cf48d05e8be79853458e881075b38c1171e3 (patch) | |
| tree | 704289460569ab6e10de76c00c5df5eb910c3326 | |
| parent | dae0de44617cf9e4584f8aa8cd34db4cd928a0c8 (diff) | |
| download | mruby-2b05cf48d05e8be79853458e881075b38c1171e3.tar.gz mruby-2b05cf48d05e8be79853458e881075b38c1171e3.zip | |
Work around removing tmp dir
| -rw-r--r-- | lib/mruby/build/command.rb | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/mruby/build/command.rb b/lib/mruby/build/command.rb index 80c01b38f..2aaa14239 100644 --- a/lib/mruby/build/command.rb +++ b/lib/mruby/build/command.rb @@ -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 |
