add cmd to log

This commit is contained in:
Julian Freeman
2026-03-31 11:42:07 -04:00
parent cf740b9e3a
commit 7e550a8d49
2 changed files with 3 additions and 2 deletions

View File

@@ -274,7 +274,8 @@ pub fn run() {
"--disable-interactivity".to_string(), "--disable-interactivity".to_string(),
]); ]);
emit_log(&handle, &log_id, &display_cmd, "Starting...", "info"); let full_command = format!("winget {}", args.join(" "));
emit_log(&handle, &log_id, &display_cmd, &format!("Executing: {}\n---", full_command), "info");
let h = handle.clone(); let h = handle.clone();
let current_id = task_id.clone(); let current_id = task_id.clone();

View File

@@ -227,7 +227,7 @@ pub fn list_updates(handle: &AppHandle) -> Vec<Software> {
} }
fn execute_powershell(handle: &AppHandle, log_id: &str, cmd_title: &str, script: &str) -> Vec<Software> { fn execute_powershell(handle: &AppHandle, log_id: &str, cmd_title: &str, script: &str) -> Vec<Software> {
emit_log(handle, log_id, cmd_title, "Executing PowerShell...", "info"); emit_log(handle, log_id, cmd_title, &format!("Executing Script:\n{}\n---", script), "info");
let output = Command::new("powershell") let output = Command::new("powershell")
.args(["-NoProfile", "-Command", script]) .args(["-NoProfile", "-Command", script])