From 88876163f9fa830a846e9b97a8347248837b6613 Mon Sep 17 00:00:00 2001 From: Rick Olson Date: Tue, 27 Feb 2007 03:15:44 +0000 Subject: boot.rb sets RAILS_ROOT, so remove that. Install http plugins inside a Dir.chdir block so that the cwd doesn't change git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6248 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- railties/lib/commands/plugin.rb | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'railties/lib/commands/plugin.rb') diff --git a/railties/lib/commands/plugin.rb b/railties/lib/commands/plugin.rb index c5ee3e2896..af23197549 100644 --- a/railties/lib/commands/plugin.rb +++ b/railties/lib/commands/plugin.rb @@ -240,11 +240,12 @@ class Plugin def install_using_http(options = {}) root = rails_env.root mkdir_p "#{root}/vendor/plugins" - Dir.chdir "#{root}/vendor/plugins" - puts "fetching from '#{uri}'" if $verbose - fetcher = RecursiveHTTPFetcher.new(uri) - fetcher.quiet = true if options[:quiet] - fetcher.fetch + Dir.chdir "#{root}/vendor/plugins" do + puts "fetching from '#{uri}'" if $verbose + fetcher = RecursiveHTTPFetcher.new(uri) + fetcher.quiet = true if options[:quiet] + fetcher.fetch + end end def svn_command(cmd, options = {}) @@ -914,5 +915,4 @@ class RecursiveHTTPFetcher end end -RAILS_ROOT = RailsEnvironment.default.root unless Object.const_defined?(:RAILS_ROOT) Commands::Plugin.parse! -- cgit v1.2.3