Skip to content

Commit

Permalink
Merge #976
Browse files Browse the repository at this point in the history
976: Backports for 1.1.2 r=fredrikekre a=fredrikekre

bors try

Co-authored-by: David Varela <[email protected]>
Co-authored-by: Fredrik Ekre <[email protected]>
  • Loading branch information
3 people committed Dec 26, 2018
2 parents cfbe047 + 529b896 commit 853b3f1
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ desc = "The next-generation Julia package manager."
keywords = ["package", "management"]
license = "MIT"
name = "Pkg"
version = "1.1.1"
version = "1.1.2"
uuid = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f"

[deps]
Expand Down
4 changes: 2 additions & 2 deletions src/API.jl
Original file line number Diff line number Diff line change
Expand Up @@ -239,9 +239,9 @@ function gc(ctx::Context=Context(); kwargs...)
manifest == nothing && continue
new_usage[manifestfile] = [Dict("time" => date)]
for (uuid, entry) in manifest
if entry.git_tree_sha !== nothing
if entry.repo.tree_sha !== nothing
push!(paths_to_keep,
Operations.find_installed(entry.name, uuid, entry.git_tree_sha))
Operations.find_installed(entry.name, uuid, entry.repo.tree_sha))
end
end
end
Expand Down
10 changes: 10 additions & 0 deletions test/pkg.jl
Original file line number Diff line number Diff line change
Expand Up @@ -602,6 +602,16 @@ end
end
end

#issue #975
@testset "Pkg.gc" begin
temp_pkg_dir() do project_path
with_temp_env() do
Pkg.add("Example")
Pkg.gc()
end
end
end

include("repl.jl")
include("api.jl")
include("registry.jl")
Expand Down

0 comments on commit 853b3f1

Please sign in to comment.