feat(installer): add dummy command to prevent empty shell execution

The change adds `arg("true")` to the shell command to prevent executing an empty shell command when a component is already running. This ensures a valid command is always passed to the shell, avoiding potential issues with empty command execution.
This commit is contained in:
Rodrigo Rodriguez (Pragmatismo) 2025-11-12 13:47:21 -03:00
parent 4b76243662
commit a9af37e385

View file

@ -674,7 +674,7 @@ impl PackageManager {
if check_status.is_ok() && check_status.unwrap().success() {
trace!("Component {} is already running", component.name);
return Ok(std::process::Command::new("sh").arg("-c").spawn()?);
return Ok(std::process::Command::new("sh").arg("-c").arg("true").spawn()?);
}
// If not running, execute the main command