Merge pull request #37 from edubkendo/glob_fix
Fixes glob to work with 2.0.0
This commit is contained in:
@@ -181,7 +181,7 @@ class Homesick < Thor
|
||||
end
|
||||
|
||||
def all_castles
|
||||
dirs = Pathname.glob("#{repos_dir}/**/*/.git")
|
||||
dirs = Pathname.glob("#{repos_dir}/**/.git", File::FNM_DOTMATCH)
|
||||
# reject paths that lie inside another castle, like git submodules
|
||||
return dirs.reject do |dir|
|
||||
dirs.any? {|other| dir != other && dir.fnmatch(other.parent.join('*').to_s) }
|
||||
|
||||
Reference in New Issue
Block a user