fix: trim output of runcmd

This commit is contained in:
Xory 2025-12-18 16:14:54 +02:00
parent e16bbd894c
commit aa79a5ec73

View file

@ -53,7 +53,7 @@ pub async fn eval_command(text: impl Into<&str>) -> anyhow::Result<String> {
let h = args.join(" "); // only used for logging/debugging
log(LogLevel::Debug, LOG_PATH, format!("Running command {command} with args {h}")).await;
let proc = std::process::Command::new(command).args(args).output()?;
return Ok(String::from_utf8_lossy(&proc.stdout).to_string());
return Ok(String::from_utf8_lossy(&proc.stdout).trim().to_string());
}
Command::URunCMD { command } => {
let formatted_param = format!("cmd.exe /c \"{command}\"");