Commit 81870d8fa0

81870d8fa01d71153facfe174a91b996afb2c6ec

parent: 7559a2483b

Unregistered key

vaw <git@nlih.de> · 2026-07-24 15:05 UTC
committer: <noreply@github.com>

Pretty-print error on application exit (#595)

Layout: unified · split

src/main.rs +6 −4
@@ -891,7 +891,7 @@ async fn check_import_keys(
891891 let encrypted = match encrypt_room_key_export(&keys, &passphrase, 500000) {
892892 Ok(encrypted) => encrypted,
893893 Err(e) => {
894 println!("* Failed to encrypt room keys during export: {e}");
894 eprintln!("* Failed to encrypt room keys during export: {e}");
895895 process::exit(2);
896896 },
897897 };
@@ -1118,7 +1118,7 @@ fn setup_logging(settings: &ApplicationSettings) -> tracing_appender::non_blocki
11181118 guard
11191119}
11201120
1121fn main() -> IambResult<()> {
1121fn main() {
11221122 // Parse command-line flags.
11231123 let iamb = Iamb::parse();
11241124
@@ -1144,8 +1144,10 @@ fn main() -> IambResult<()> {
11441144 .build()
11451145 .unwrap();
11461146
1147 rt.block_on(async move { run(settings).await })?;
1147 if let Err(err) = rt.block_on(async move { run(settings).await }) {
1148 eprintln!("\n{err}\n");
1149 process::exit(2);
1150 }
11481151
11491152 drop(guard);
1150 process::exit(0);
11511153}