Skip to content

Commit 6ce074e

Browse files
committed
fix: Incompatibility in the latest ZIO
1 parent 9b93c45 commit 6ce074e

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

bundle-zio-http4s-blaze/src/main/scala/com/avast/sst/bundle/ZioResourceApp.scala

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,15 @@ trait ZioResourceApp[A] extends CatsApp {
1515

1616
def program: Resource[Task, A]
1717

18-
override def run(args: List[String]): ZIO[ZEnv, Nothing, Int] = {
18+
override def run(args: List[String]): ZIO[ZEnv, Nothing, ExitCode] = {
1919
program
2020
.use(_ => Task.unit)
2121
.fold(
2222
ex => {
2323
logger.error("Application initialization failed!", ex)
24-
1
24+
ExitCode.failure
2525
},
26-
_ => 0
26+
_ => ExitCode.success
2727
)
2828
}
2929

bundle-zio-http4s-blaze/src/main/scala/com/avast/sst/bundle/ZioServerApp.scala

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ trait ZioServerApp extends CatsApp {
1919
def program: Resource[Task, Server[Task]]
2020

2121
@silent("dead code")
22-
override def run(args: List[String]): ZIO[ZEnv, Nothing, Int] = {
22+
override def run(args: List[String]): ZIO[ZEnv, Nothing, ExitCode] = {
2323
program
2424
.use { server =>
2525
for {
@@ -30,9 +30,9 @@ trait ZioServerApp extends CatsApp {
3030
.fold(
3131
ex => {
3232
logger.error("Server initialization failed!", ex)
33-
1
33+
ExitCode.failure
3434
},
35-
_ => 0
35+
_ => ExitCode.success
3636
)
3737
}
3838

0 commit comments

Comments
 (0)