Add bxctl audit verify
Implemented-By: OpenCode session (model recorded in docs/implementer-log.md)
This commit is contained in:
@@ -36,9 +36,19 @@ fn main() -> ExitCode {
|
||||
reason,
|
||||
} => exit(|| cmd_refuse(&admin_socket, approval, reason.as_deref())),
|
||||
Command::GrantsCheck { admin_socket } => exit(|| cmd_grants_check(&admin_socket)),
|
||||
Command::AuditVerify { home: _ } => {
|
||||
eprintln!("bxctl: audit verify is not implemented yet");
|
||||
ExitCode::from(1)
|
||||
Command::AuditVerify { home } => {
|
||||
let mut out = std::io::stdout().lock();
|
||||
match bxctl::verify::run(&home, &mut out) {
|
||||
Ok(true) => ExitCode::SUCCESS,
|
||||
Ok(false) => ExitCode::from(1),
|
||||
Err(e) => {
|
||||
eprintln!(
|
||||
"bxctl: cannot read the audit log under {}: {e}",
|
||||
home.display()
|
||||
);
|
||||
ExitCode::from(1)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user