Skip to content

Commit b85e294

Browse files
Stop discover_repo when reaching the depot (#4322)
1 parent d2bc406 commit b85e294

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/utils.jl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -183,8 +183,10 @@ end
183183
function discover_repo(path::AbstractString)
184184
dir = abspath(path)
185185
stop_dir = homedir()
186+
depot = Pkg.depots1()
186187

187188
while true
189+
dir == depot && return nothing
188190
gitdir = joinpath(dir, ".git")
189191
if isdir(gitdir) || isfile(gitdir)
190192
return dir

0 commit comments

Comments
 (0)