diff options
-rw-r--r-- | railties/lib/commands/plugin.rb | 12 |
1 files changed, 6 insertions, 6 deletions
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! |