update script-sign.rs
This commit is contained in:
@@ -13,7 +13,7 @@ use rust_util::{failure, information, success, warning};
|
||||
use script_sign::{KeyMap, Script};
|
||||
use std::fs;
|
||||
use std::path::PathBuf;
|
||||
|
||||
use std::process::exit;
|
||||
use zeroizing_alloc::ZeroAlloc;
|
||||
|
||||
#[global_allocator]
|
||||
@@ -43,6 +43,7 @@ fn main() {
|
||||
return;
|
||||
}
|
||||
|
||||
let mut sign_script_failed_count = 0;
|
||||
for (i, script_path) in args.scripts.iter().enumerate() {
|
||||
information!(
|
||||
"Signing {}/{}: {}",
|
||||
@@ -101,16 +102,23 @@ fn main() {
|
||||
success!("Sign script success: {}", script_path.display());
|
||||
}
|
||||
Err(e) => {
|
||||
sign_script_failed_count += 1;
|
||||
failure!("Sign script {} failed: {}", script_path.display(), e);
|
||||
}
|
||||
},
|
||||
Err(e) => {
|
||||
sign_script_failed_count += 1;
|
||||
failure!("Sign script {} failed: {}", script_path.display(), e);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if total_scripts == 1 && sign_script_failed_count > 0 {
|
||||
// return process failed, if there is only one script to be signed and has failed sign
|
||||
exit(1);
|
||||
}
|
||||
}
|
||||
|
||||
// @SCRIPT-SIGNATURE-V1: yk-r1.ES256.20260122T001025+08:00.MEUCIQDwfnm2/rVME/ponBv4
|
||||
// 6rPwTGmIrq8DucJCyk3kiI0LZwIgPkQrBuV3g9gy77XJnSK2xvttOPmRaO5HogiIb16TSvA=
|
||||
// @SCRIPT-SIGNATURE-V1: yk-r1.ES256.20260209T011113+08:00.MEQCIHdSkLLsEaHLU695/PVz
|
||||
// /67kQEe/yEphugc8gmDW/NqhAiATWMQ0KXnGZWIalz/SFoGecrXedVzMw4y7Lt+STppysw==
|
||||
|
||||
Reference in New Issue
Block a user