Skip to content

Call artifacts download delegate final method #3150

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions Sources/Workspace/Workspace.swift
Original file line number Diff line number Diff line change
Expand Up @@ -1608,6 +1608,7 @@ extension Workspace {
let tempDiagnostics = DiagnosticsEngine()

var authProvider: AuthorizationProviding? = nil
var didDownloadAnyArtifact = false
#if os(macOS)
// Netrc feature currently only supported on macOS 10.13+ due to dependency
// on NSTextCheckingResult.range(with:)
Expand Down Expand Up @@ -1636,7 +1637,7 @@ extension Workspace {
}
let archivePath = parentDirectory.appending(component: parsedURL.lastPathComponent)


didDownloadAnyArtifact = true
downloader.downloadFile(
at: parsedURL,
to: archivePath,
Expand Down Expand Up @@ -1684,7 +1685,10 @@ extension Workspace {
}

group.wait()
delegate?.didDownloadBinaryArtifacts()

if didDownloadAnyArtifact {
delegate?.didDownloadBinaryArtifacts()
}

for diagnostic in tempDiagnostics.diagnostics {
diagnostics.emit(diagnostic.message, location: diagnostic.location)
Expand Down