Skip to content

Commit

Permalink
ensure fail finishes
Browse files Browse the repository at this point in the history
  • Loading branch information
loganwright committed Mar 30, 2017
1 parent 8c8c17b commit 247225e
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Sources/Console/Bar/Bar.swift
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,11 @@ public class Bar {
}

public func fail(_ message: String? = nil) {
guard !hasFinished else {
return
}
hasFinished = true

let message = message ?? "Failed"

if animated {
Expand Down

0 comments on commit 247225e

Please sign in to comment.