Permalink
Browse files

fix --subtree, i think.

  • Loading branch information...
1 parent 710fd88 commit 46f31c1c13e1288cc2835d251e9b4ef2b85666a2 Robey Pointer committed Sep 2, 2010
Showing with 3 additions and 3 deletions.
  1. +3 −3 lib/gizzard/commands.rb
View
@@ -5,13 +5,13 @@ class Command
attr_reader :buffer
- def self.run(command_name, global_options, argv, subcommand_options, log)
+ def self.run(command_name, global_options, argv, subcommand_options, log, service=nil)
command_class = Gizzard.const_get("#{classify(command_name)}Command")
- service = command_class.make_service(global_options, log)
+ service = command_class.make_service(global_options, log) if service.nil?
command = command_class.new(service, global_options, argv, subcommand_options)
command.run
if command.buffer && command_name = global_options.render.shift
- run(command_name, service, global_options, command.buffer, OpenStruct.new)
+ run(command_name, global_options, command.buffer, OpenStruct.new, log, service)
end
end

0 comments on commit 46f31c1

Please sign in to comment.