Permalink
Browse files

Fixed issue where default method options weren't picked up for tasks …

…that didn't use method_options explicitly
  • Loading branch information...
1 parent d290c8e commit f0a7458f8a26f4bf2b5abb67f78cb71ddc3ff435 @fabien fabien committed Oct 12, 2008
Showing with 2 additions and 2 deletions.
  1. +1 −1 lib/thor/runner.rb
  2. +1 −1 lib/thor/task.rb
View
@@ -92,7 +92,7 @@ def update(name)
puts "Updating `#{name}' from #{yaml[name][:location]}"
old_filename = yaml[name][:filename]
- options["as"] = name
+ self.options = self.options.merge("as" => name)
filename = install(yaml[name][:location])
unless filename == old_filename
File.delete(File.join(thor_root, old_filename))
View
@@ -63,7 +63,7 @@ def full_opts
end
def options?
- @options && !@options.empty?
+ @options.kind_of?(Hash)
end
def formatted_usage(namespace = false)

0 comments on commit f0a7458

Please sign in to comment.