mirror of
https://github.com/Zedfrigg/ironbar.git
synced 2025-08-17 23:01:04 +02:00
feat(cli): debug flag
This commit is contained in:
parent
a0cb01ae5f
commit
7413f78e04
3 changed files with 23 additions and 3 deletions
14
src/main.rs
14
src/main.rs
|
@ -85,11 +85,21 @@ fn run_with_args() {
|
|||
|
||||
match args.command {
|
||||
Some(command) => {
|
||||
if args.debug {
|
||||
eprintln!("REQUEST: {command:?}")
|
||||
}
|
||||
|
||||
let rt = create_runtime();
|
||||
rt.block_on(async move {
|
||||
let ipc = ipc::Ipc::new();
|
||||
match ipc.send(command).await {
|
||||
Ok(res) => cli::handle_response(res),
|
||||
match ipc.send(command, args.debug).await {
|
||||
Ok(res) => {
|
||||
if args.debug {
|
||||
eprintln!("RESPONSE: {res:?}")
|
||||
}
|
||||
|
||||
cli::handle_response(res, args.format.unwrap_or_default())
|
||||
}
|
||||
Err(err) => error!("{err:?}"),
|
||||
};
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue