Permalink
Browse files

Fix rake desc not being passed to thor

  • Loading branch information...
1 parent 0cfe4af commit 36603c1811451d370da4915e24eed665fe805ae4 @cldwalker cldwalker committed Jul 4, 2011
Showing with 2 additions and 1 deletion.
  1. +2 −1 lib/thor/rake_compat.rb
View
3 lib/thor/rake_compat.rb
@@ -46,7 +46,8 @@ def task(*)
description << task.arg_names.map{ |n| n.to_s.upcase }.join(' ')
description.strip!
- klass.desc description, task.comment || non_namespaced_name
+ klass.desc description, Rake.application.last_description || non_namespaced_name
+ Rake.application.last_description = nil
klass.send :define_method, non_namespaced_name do |*args|
Rake::Task[task.name.to_sym].invoke(*args)
end

0 comments on commit 36603c1

Please sign in to comment.