Skip to content

Commit

Permalink
Merge pull request #3377 from esamson/patch-2
Browse files Browse the repository at this point in the history
Fix exit code policy
  • Loading branch information
alejandrohdezma authored Jun 25, 2024
2 parents 9260423 + 0eec03c commit 14aa0eb
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,5 @@ object ExitCodePolicy {

val SuccessIfAnyRepoSucceeds: ExitCodePolicy = successIf(_.successRepos.nonEmpty)

val SuccessOnlyIfAllReposSucceed: ExitCodePolicy = successIf(_.reposWithFailures.nonEmpty)
val SuccessOnlyIfAllReposSucceed: ExitCodePolicy = successIf(_.reposWithFailures.isEmpty)
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,6 @@ import org.scalasteward.core.mock.{MockConfig, MockState}
class StewardAlgTest extends CatsEffectSuite {
test("runF") {
val exitCode = stewardAlg.runF.runA(MockState.empty.addUris(MockConfig.reposFile -> ""))
assertIO(
exitCode,
ExitCode.Error
) // We have not passed any repos to Scala Steward therefore it's reasonable that it will return error code.
assertIO(exitCode, ExitCode.Success)
}
}

0 comments on commit 14aa0eb

Please sign in to comment.