Ignore non-git repositories
April 09, 2016
This revision makes sure Goon doesn't try to mess around with ﬁles in the project dir that aren't Git repositories, by silently ignoring them.
1 files changed, 4 insertions / 1 deletions
diff --git a/goon.scm b/goon.scm index d164933..c31b8f8 100755 --- a/goon.scm +++ b/goon.scm @@ -123,7 +123,10 @@ (define (read-category dir) (map (lambda (x) (repository-open (filepath:combine dir x))) - (directory dir))) + (filter (lambda (x) + (and (file-exists? (filepath:combine + dir (filepath:combine x ".git"))))) + (directory dir)))) (define (read-categories) (map (lambda (x) (cons (category-name x) (read-category x)))