Skip to content

Commit

Permalink
fix(cli): ignoreFailures should produce error if false
Browse files Browse the repository at this point in the history
  • Loading branch information
Malinskiy committed Apr 29, 2023
1 parent 182d46a commit e7df9e5
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -84,10 +84,9 @@ private fun execute(cliConfiguration: CliConfiguration) {
throw PrintMessage(message = "Marathon execution crashed", error = true)
}

val shouldReportFailure = !configuration.ignoreFailures
when {
success -> throw PrintMessage(message = "Marathon execution finished", error = false)
shouldReportFailure -> throw PrintMessage(message = "Marathon execution finished with failures (Failures suppressed because ignoreFailures is `true`)", error = false)
configuration.ignoreFailures -> throw PrintMessage(message = "Marathon execution finished with failures (Failures suppressed because ignoreFailures is `true`)", error = false)
else -> throw PrintMessage(message = "Marathon execution failed", error = true)
}
} finally {
Expand Down

0 comments on commit e7df9e5

Please sign in to comment.