From 2702ee0828ac33a3753275704378f0f34aa4766a Mon Sep 17 00:00:00 2001 From: Brad Warren Date: Thu, 18 Jun 2026 14:02:35 -0700 Subject: [PATCH] add basic logging Co-authored-by: Will Greenberg --- installer-gui/src-tauri/src/introspect.rs | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/installer-gui/src-tauri/src/introspect.rs b/installer-gui/src-tauri/src/introspect.rs index 3c1744b..4313074 100644 --- a/installer-gui/src-tauri/src/introspect.rs +++ b/installer-gui/src-tauri/src/introspect.rs @@ -3,6 +3,7 @@ use std::collections::HashMap; use anyhow::Context; +use log::error; use serde::Serialize; use crate::modifiers; @@ -88,12 +89,17 @@ impl Subcommand<'_> { .arg_modifiers .iter() .filter_map(|arg_modifier| { - argument_map - .get(arg_modifier.clap_id) - // if Argument::try_new fails, the argument is silently dropped from the - // GUI, however, tests should prevent this from happening and we could add - // logging messages about this in the future if desired - .and_then(|arg| Argument::try_new(arg, arg_modifier).ok()) + let Some(arg) = argument_map.get(arg_modifier.clap_id) else { + error!("failed to get argument with id {arg_modifier.clap_id}"); + return None; + }; + match Argument::try_new(arg, arg_modifier) { + Ok(modified_arg) => Some(modified_arg), + Err(err) => { + error!("failed to modify arg: {err:?}"); + None + } + } }) .collect(), command: modifier.command,