Skip to content

Commit

Permalink
Log updatePackage errors (and don't abort)
Browse files Browse the repository at this point in the history
  • Loading branch information
finestructure committed Sep 25, 2023
1 parent d95b7a9 commit 132f8d6
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 5 additions & 1 deletion Sources/App/Commands/Common.swift
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,11 @@ func updatePackages(client: Client,
}
}
for result in results {
try await updatePackage(client: client, database: database, logger: logger, result: result, stage: stage)
do {
try await updatePackage(client: client, database: database, logger: logger, result: result, stage: stage)
} catch {
logger.critical("updatePackage failed: \(error)")
}
}

logger.debug("updateStatus ops: \(results.count)")
Expand Down
2 changes: 1 addition & 1 deletion Tests/AppTests/AnalyzerTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -788,7 +788,7 @@ class AnalyzerTests: AppTestCase {
XCTAssertEqual(targets.map(\.type), [.regular, .executable])
}

func test_updatePackage() async throws {
func test_updatePackages() async throws {
// setup
let packages = try savePackages(on: app.db, ["1", "2"].asURLs)
.map(Joined<Package, Repository>.init(model:))
Expand Down

0 comments on commit 132f8d6

Please sign in to comment.