mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Importing rubygems @ c2d4131: Deal with platforms that have DLEXT2 == nil. Fixes RF#28867
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30608 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
df2762fb1a
commit
64847a9cfe
10 changed files with 274 additions and 91 deletions
|
@ -57,12 +57,16 @@ class Gem::Commands::SourcesCommand < Gem::Command
|
|||
path = Gem::SpecFetcher.fetcher.dir
|
||||
FileUtils.rm_rf path
|
||||
|
||||
if not File.exist?(path) then
|
||||
unless File.exist? path then
|
||||
say "*** Removed specs cache ***"
|
||||
elsif not File.writable?(path) then
|
||||
say "*** Unable to remove source cache (write protected) ***"
|
||||
else
|
||||
say "*** Unable to remove source cache ***"
|
||||
unless File.writable? path then
|
||||
say "*** Unable to remove source cache (write protected) ***"
|
||||
else
|
||||
say "*** Unable to remove source cache ***"
|
||||
end
|
||||
|
||||
terminate_interaction 1
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -78,8 +82,10 @@ class Gem::Commands::SourcesCommand < Gem::Command
|
|||
say "#{source_uri} added to sources"
|
||||
rescue URI::Error, ArgumentError
|
||||
say "#{source_uri} is not a URI"
|
||||
terminate_interaction 1
|
||||
rescue Gem::RemoteFetcher::FetchError => e
|
||||
say "Error fetching #{source_uri}:\n\t#{e.message}"
|
||||
terminate_interaction 1
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue