style: Improve readability (hide root directory in list)

This commit is contained in:
Glenn Y. Rolland 2022-08-17 18:51:13 +02:00
parent 3eb0d70f1a
commit 603037ae0b

View file

@ -40,7 +40,7 @@ class ListRepos < Thor
Find.find(basedir) do |path| Find.find(basedir) do |path|
next unless path =~ %r{.*/.git/config$} next unless path =~ %r{.*/.git/config$}
project_root = File.dirname(File.dirname(path)) project_root = File.dirname(File.dirname(path)).gsub(%r{^#{basedir}/}, '')
lines = File.readlines(path) lines = File.readlines(path)
projects << { projects << {
path: project_root, path: project_root,