Skip to content

Commit b9c1c1d

Browse files
author
nixo
committed
base: loading: support fake mtime with SOURCE_DATE_EPCOCH
Do this when loading libraries
1 parent b0c33b0 commit b9c1c1d

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

base/loading.jl

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -812,7 +812,10 @@ function _include_dependency(mod::Module, _path::AbstractString)
812812
path = normpath(joinpath(dirname(prev), _path))
813813
end
814814
if _track_dependencies[]
815-
push!(_require_dependencies, (mod, path, mtime(path)))
815+
push!(_require_dependencies,
816+
(mod, path,
817+
haskey(ENV, "SOURCE_DATE_EPOCH") ?
818+
parse(Float64, ENV["SOURCE_DATE_EPOCH"]) : mtime(path)))
816819
end
817820
return path, prev
818821
end

0 commit comments

Comments
 (0)