Skip to content

Commit

Permalink
Don't abort when multiple versions are being deleted
Browse files Browse the repository at this point in the history
  • Loading branch information
finestructure committed Sep 26, 2023
1 parent 3d51103 commit a38b907
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions Sources/App/Commands/Analyze.swift
Original file line number Diff line number Diff line change
Expand Up @@ -224,9 +224,7 @@ extension Analyze {
package: package)
let netDeleteCount = versionDelta.toDelete.count - versionDelta.toAdd.count
if netDeleteCount > 1 {
// Sudden loss of versions is suspicious, warn and throw error
let error = "Suspicious loss of \(netDeleteCount) versions for package \(package.model.id) - aborting analysis"
throw AppError.genericError(package.model.id, error)
logger.warning("Suspicious loss of \(netDeleteCount) versions for package \(package.model.id)")
}

try await applyVersionDelta(on: tx, delta: versionDelta)
Expand Down

0 comments on commit a38b907

Please sign in to comment.