diff --git a/lib/thor/util.rb b/lib/thor/util.rb index 6e3a545a..628c6048 100644 --- a/lib/thor/util.rb +++ b/lib/thor/util.rb @@ -211,7 +211,7 @@ def thor_root_glob # def globs_for(path) path = escape_globs(path) - ["#{path}/Thorfile", "#{path}/*.thor", "#{path}/tasks/*.thor", "#{path}/lib/tasks/*.thor"] + ["#{path}/Thorfile", "#{path}/*.thor", "#{path}/tasks/*.thor", "#{path}/lib/tasks/**/*.thor"] end # Return the path to the ruby interpreter taking into account multiple diff --git a/spec/util_spec.rb b/spec/util_spec.rb index 2182bed8..9914706c 100644 --- a/spec/util_spec.rb +++ b/spec/util_spec.rb @@ -180,7 +180,7 @@ def self.clear_user_home! '/home/apps\\{1\\}/Thorfile', '/home/apps\\{1\\}/*.thor', '/home/apps\\{1\\}/tasks/*.thor', - '/home/apps\\{1\\}/lib/tasks/*.thor' + '/home/apps\\{1\\}/lib/tasks/**/*.thor' ]) end end