Skip to content

Commit

Permalink
Merge pull request #791 from MarathonLabs/fix/ignore-failures
Browse files Browse the repository at this point in the history
fix(cli): ignoreFailures should produce error if false
  • Loading branch information
Malinskiy authored Apr 29, 2023
2 parents 182d46a + e7df9e5 commit 1365090
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 1365090

Please sign in to comment.