mirror of
https://github.com/julia-actions/setup-julia.git
synced 2026-02-12 19:16:54 +08:00
12 lines
469 B
Julia
12 lines
469 B
Julia
if !occursin("hostedtoolcache", Sys.BINDIR)
|
|
error("the wrong julia is being used: $(Sys.BINDIR)")
|
|
end
|
|
if VERSION >= v"1.7.0" # pkgdir was introduced here, and before then mtime wasn't a problem so just skip
|
|
using Pkg
|
|
src = pkgdir(Pkg, "src", "Pkg.jl")
|
|
# mtime is when it's compressed, ctime is when the file is extracted
|
|
if mtime(src) >= ctime(src)
|
|
error("source mtime ($(mtime(src))) is not earlier than ctime ($(ctime(src)))")
|
|
end
|
|
end
|