mirror of
https://github.com/TECHNOFAB11/pay-respects.git
synced 2025-12-12 06:20:09 +01:00
feat: noconfirm mode
This commit is contained in:
parent
885dc081e1
commit
5f521650c8
4 changed files with 48 additions and 0 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue