Good catch, could you change it to just this expression please?
```scala
new File(dir, markerDirectory).isDirectory || Option(dir.getParentFile).exists(isRepository(_))
```