Add support to speicfy exit code when error happened

This commit is contained in:
2025-11-03 22:46:45 +08:00
parent 5df59d6345
commit 0e4b308433
4 changed files with 38 additions and 4 deletions

View File

@@ -564,6 +564,12 @@ pub struct Arg {
#[arg(long, global = true)]
/// Compress files in Musica paz archive when packing paz archive.
pub musica_compress: bool,
#[arg(short = 'x', long, default_value_t = 0)]
/// Exit code when some jobs failed
pub exit_code: i32,
#[arg(short = 'X', long)]
/// Exit code when all jobs failed. By default, this is same as exit_code. This can override exit_code when all jobs failed.
pub exit_code_all_failed: Option<i32>,
#[command(subcommand)]
/// Command
pub command: Command,