Skip to content

Commit

Permalink
terminate Pkg.update on InterruptException
Browse files Browse the repository at this point in the history
  • Loading branch information
wildart committed May 19, 2016
1 parent 69c98cd commit 71091b9
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions base/pkg/entry.jl
Original file line number Diff line number Diff line change
Expand Up @@ -377,6 +377,7 @@ function update(branch::AbstractString)
end
creds = LibGit2.CachedCredentials()
fixed = Read.fixed(avail,instd)
stopupdate = false
for (pkg,ver) in fixed
ispath(pkg,".git") || continue
with(GitRepo, pkg) do repo
Expand All @@ -394,6 +395,7 @@ function update(branch::AbstractString)
cex = CapturedException(err, catch_backtrace())
push!(deferred_errors, PkgError("Package $pkg cannot be updated.", cex))
success = false
stopupdate = isa(err, InterruptException)
end
if success
post_sha = string(LibGit2.head_oid(repo))
Expand All @@ -404,6 +406,7 @@ function update(branch::AbstractString)
end
end
end
stopupdate && break
if haskey(avail,pkg)
try
Cache.prefetch(pkg, Read.url(pkg), [a.sha1 for (v,a)=avail[pkg]])
Expand Down

0 comments on commit 71091b9

Please sign in to comment.