Skip to content

Commit 2d02013

Browse files
authored
Don't throw in source_url() (#1964)
1 parent 1d3de45 commit 2d02013

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/Utilities/Utilities.jl

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -467,7 +467,7 @@ function source_url(repo, mod, file, linerange)
467467
Base.GIT_VERSION_INFO.commit
468468
end
469469
repofile(julia_remote, ref, "base/$file", linerange)
470-
else
470+
elseif isfile(file)
471471
path = relpath_from_repo_root(file)
472472
# If we managed to determine a remote for the current file with getremote,
473473
# then we use that information instead of the user-provided repo (doc.user.remote)
@@ -487,6 +487,8 @@ function source_url(repo, mod, file, linerange)
487487
return nothing
488488
end
489489
repofile(remote, repo_commit(file), path, linerange)
490+
else
491+
return nothing
490492
end
491493
end
492494

0 commit comments

Comments
 (0)