ruby-changes:61157
From: Nobuyoshi <ko1@a...>
Date: Sat, 9 May 2020 13:47:43 +0900 (JST)
Subject: [ruby-changes:61157] 1181edd54c (master): rbuninstall.rb: show paths without destdir as well as rbinstall.rb
https://git.ruby-lang.org/ruby.git/commit/?id=1181edd54c From 1181edd54cdfb86fa6d3fe7cd52deb4b81d370ee Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada <nobu@r...> Date: Sat, 9 May 2020 13:45:50 +0900 Subject: rbuninstall.rb: show paths without destdir as well as rbinstall.rb diff --git a/tool/rbuninstall.rb b/tool/rbuninstall.rb index 2a16b8f..f0c2860 100755 --- a/tool/rbuninstall.rb +++ b/tool/rbuninstall.rb @@ -23,7 +23,6 @@ BEGIN { https://github.com/ruby/ruby/blob/trunk/tool/rbuninstall.rb#L23 $files = [] } list = ($_.chomp!('/') ? $dirs : $files) -$_ = File.join($destdir, $_) if $destdir list << $_ END { status = true @@ -32,6 +31,7 @@ END { https://github.com/ruby/ruby/blob/trunk/tool/rbuninstall.rb#L31 $files.each do |file| print "rm #{file}#{ors}" unless $dryrun + file = File.join($destdir, file) if $destdir begin File.unlink(file) rescue Errno::ENOENT @@ -49,13 +49,14 @@ END { https://github.com/ruby/ruby/blob/trunk/tool/rbuninstall.rb#L49 dir = File.dirname(dir) while File.basename(dir) == '.' print "rmdir #{dir}#{ors}" unless $dryrun + realdir = $destdir ? File.join($destdir, dir) : dir begin begin unlink.delete(dir) - Dir.rmdir(dir) + Dir.rmdir(realdir) rescue Errno::ENOTDIR - raise unless File.symlink?(dir) - File.unlink(dir) + raise unless File.symlink?(realdir) + File.unlink(realdir) end rescue Errno::ENOENT, Errno::ENOTEMPTY rescue -- cgit v0.10.2 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/