Skip to content

Commit

Permalink
Fix default status code for CliktError from 0 to 1 (#403)
Browse files Browse the repository at this point in the history
  • Loading branch information
russellbanks committed Apr 17, 2023
1 parent 67a509c commit 165fdb2
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import com.github.ajalt.clikt.parameters.options.longestName
open class CliktError(
message: String? = null,
cause: Exception? = null,
val statusCode: Int = 0,
val statusCode: Int = 1,
val printError: Boolean = true,
) : RuntimeException(message, cause)

Expand All @@ -37,7 +37,7 @@ class PrintHelpMessage(val command: CliktCommand, val error: Boolean = false) :
*/
open class PrintMessage(
message: String,
statusCode: Int = 0,
statusCode: Int = 1,
printError: Boolean = false,
) : CliktError(message, statusCode = statusCode, printError = printError)

Expand Down

0 comments on commit 165fdb2

Please sign in to comment.