Skip to content

Commit 3065771

Browse files
committed
Check exit code value on check-ignore
1 parent e8920f9 commit 3065771

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

modules/core/src/main/scala/org/scalasteward/core/git/FileGitAlg.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ final class FileGitAlg[F[_]](config: GitCfg)(implicit
5050
override def checkIgnore(repo: File, file: String): F[Boolean] =
5151
git_("check-ignore", file)(repo)
5252
.as(true)
53-
.recover { case _: ProcessFailedException => false }
53+
.recover { case ex: ProcessFailedException if ex.exitValue === 1 => false }
5454

5555
override def clone(repo: File, url: Uri): F[Unit] =
5656
for {

modules/core/src/main/scala/org/scalasteward/core/io/process.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ object process {
148148
final class ProcessFailedException(
149149
args: Args,
150150
buffer: ListBuffer[String],
151-
exitValue: Int
151+
val exitValue: Int
152152
) extends IOException(makeMessage(args, buffer)(s"exited with code $exitValue."))
153153

154154
final class ProcessTimedOutException(

0 commit comments

Comments
 (0)