Skip to content

Commit 9019829

Browse files
Fixups for Julia 1.0
1 parent 1b76daf commit 9019829

File tree

1 file changed

+11
-10
lines changed

1 file changed

+11
-10
lines changed

src/utilities.jl

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -523,19 +523,20 @@ on TravisCI as well.
523523
function url(m::Method)
524524
if haskey(ENV, "TRAVIS_REPO_SLUG")
525525
repo = ENV["TRAVIS_REPO_SLUG"]
526+
526527
commit = get(ENV, "TRAVIS_COMMIT", nothing)
528+
commit === nothing && return ""
529+
527530
root = get(ENV, "TRAVIS_BUILD_DIR", nothing)
528-
if any(isnothing, (commit, root))
529-
return ""
531+
root === nothing && return ""
532+
533+
file = string(m.file)
534+
if startswith(file, root) || startswith(realpath(file), root)
535+
base = "https://github.com/$repo/tree"
536+
filename = lstrip(file[(length(root)+1):end], '/')
537+
return "$base/$commit/$filename#L$(m.line)"
530538
else
531-
file = string(m.file)
532-
if startswith(file, root) || startswith(realpath(file), root)
533-
base = "https://github.com/$repo/tree"
534-
filename = lstrip(file[(length(root)+1):end], '/')
535-
return "$base/$commit/$filename#L$(m.line)"
536-
else
537-
return ""
538-
end
539+
return ""
539540
end
540541
else
541542
return Base.url(m)

0 commit comments

Comments
 (0)