diff --git a/rake.d/helpers.rb b/rake.d/helpers.rb index ba99c1b9e..28ddf3abd 100644 --- a/rake.d/helpers.rb +++ b/rake.d/helpers.rb @@ -5,7 +5,6 @@ require "fileutils" $git_mutex = Mutex.new $message_mutex = Mutex.new -$dir_mutex = Mutex.new $action_width = 12 def puts(message) @@ -103,10 +102,8 @@ def runq_git(msg, cmdline, options = {}) end def ensure_dir dir - $dir_mutex.synchronize { - File.unlink(dir) if FileTest.exist?(dir) && !FileTest.directory?(dir) - Dir.mkdir(dir) if !FileTest.exist?(dir) - } + File.unlink(dir) if FileTest.exist?(dir) && !FileTest.directory?(dir) + FileUtils.mkdir_p(dir) end def create_dependency_dirs