ruby-changes:56456
From: Hiroshi <ko1@a...>
Date: Sun, 14 Jul 2019 15:25:01 +0900 (JST)
Subject: [ruby-changes:56456] Hiroshi SHIBATA: a73f452476 (master): Use FileUtils.mkdir_p instead of mkdir command directoly.
https://git.ruby-lang.org/ruby.git/commit/?id=a73f452476 From a73f45247652d563e4043af8d14964b9d911fe81 Mon Sep 17 00:00:00 2001 From: Hiroshi SHIBATA <hsbt@r...> Date: Sun, 14 Jul 2019 15:21:27 +0900 Subject: Use FileUtils.mkdir_p instead of mkdir command directoly. diff --git a/tool/sync_default_gems.rb b/tool/sync_default_gems.rb index f00e24d..f21f069 100644 --- a/tool/sync_default_gems.rb +++ b/tool/sync_default_gems.rb @@ -152,7 +152,7 @@ def sync_default_gems(gem) https://github.com/ruby/ruby/blob/trunk/tool/sync_default_gems.rb#L152 FileUtils.rm_rf(%w[ext/io/console test/io/console]) FileUtils.cp_r("#{upstream}/ext/io/console", "ext/io") FileUtils.cp_r("#{upstream}/test/io/console", "test/io") - `mkdir -p ext/io/console/lib` + FileUtils.mkdir_p("ext/io/console/lib") FileUtils.cp_r("#{upstream}/lib/io/console", "ext/io/console/lib") FileUtils.cp_r("#{upstream}/io-console.gemspec", "ext/io/console") `git checkout ext/io/console/depend` @@ -217,7 +217,7 @@ def sync_default_gems(gem) https://github.com/ruby/ruby/blob/trunk/tool/sync_default_gems.rb#L217 when "racc" FileUtils.rm_rf(%w[lib/racc* ext/racc test/racc]) FileUtils.cp_r(Dir.glob("#{upstream}/lib/racc*"), "lib") - `mkdir -p ext/racc/cparse` + FileUtils.mkdir_p("ext/racc/cparse") FileUtils.cp_r(Dir.glob("#{upstream}/ext/racc/cparse/*"), "ext/racc/cparse") FileUtils.cp_r("#{upstream}/test", "test/racc") `git checkout ext/racc/cparse/README` @@ -251,7 +251,7 @@ def update_default_gems(gem) https://github.com/ruby/ruby/blob/trunk/tool/sync_default_gems.rb#L251 author, repository = $repositories[gem.to_sym].split('/') unless File.exist?("../../#{author}/#{repository}") - `mkdir -p ../../#{author}` + FileUtils.mkdir_p("../../#{author}") `git clone git@g...:#{author}/#{repository}.git ../../#{author}/#{repository}` end -- cgit v0.10.2 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/