Skip to content

Commit

Permalink
Download progress fixes. Show compressed registry add confirmation. (#…
Browse files Browse the repository at this point in the history
…3979)

* set progressbar to nothing for efficiency

Downloads.jl shortcuts if progress == nothing

* don't show glitchy progress during header download

* add missing compressed registry add confirmation
  • Loading branch information
IanButterworth committed Aug 5, 2024
1 parent 667d8ae commit 7aef1f0
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/PlatformEngines.jl
Original file line number Diff line number Diff line change
Expand Up @@ -275,11 +275,15 @@ function download(
(total, now) -> begin
bar.max = total
bar.current = now
show_progress(io, bar)
# Downloads.download attatches the progress indicator to the header request too
# which is only ~100 bytes, and will report as 0 - 100% progress immediately
# then dip down to 0 before the actual download starts. So we only show the
# progress bar once the real download starts.
total > 1000 && show_progress(io, bar)
end
end
else
(total, now) -> nothing
nothing
end
try
Downloads.download(url, dest; headers, progress)
Expand Down
1 change: 1 addition & 0 deletions src/Registry/Registry.jl
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,7 @@ function download_registries(io::IO, regs::Vector{RegistrySpec}, depot::String=d
open(joinpath(regdir, reg.name * ".toml"), "w") do io
TOML.print(io, reg_info)
end
printpkgstyle(io, :Added, "`$(reg.name)` registry to $(Base.contractuser(regdir))")
else
mktempdir() do tmp
if reg.path !== nothing && reg.linked == true # symlink to local source
Expand Down

0 comments on commit 7aef1f0

Please sign in to comment.