feat: noconfirm mode

This commit is contained in:
iff 2025-04-05 18:42:45 +02:00
parent 885dc081e1
commit 5f521650c8
4 changed files with 48 additions and 0 deletions

View file

@ -24,6 +24,13 @@ extern crate rust_i18n;
i18n!("i18n", fallback = "en", minify_key = true);
fn main() -> Result<(), std::io::Error> {
let mode = std::env::var("_PR_MODE");
if let Ok(mode) = mode {
if mode.as_str() == "noconfirm" {
return Ok(());
}
}
let command = std::env::var("_PR_LAST_COMMAND").expect("_PR_LAST_COMMAND not set");
let error = std::env::var("_PR_ERROR_MSG").expect("_PR_ERROR_MSG not set");
colored::control::set_override(true);