Improve zfsbackup a bit

This commit is contained in:
2026-04-25 02:55:41 +02:00
parent 5f3369cf46
commit f9fef536d9
3 changed files with 52 additions and 16 deletions
+3 -2
View File
@@ -1,4 +1,4 @@
pub fn exec_command(command: &Vec<String>) -> Result<(), String> {
pub fn exec_command(command: &Vec<&str>) -> Result<String, String> {
if command.is_empty() {
return Err("Command is empty".to_string());
}
@@ -15,5 +15,6 @@ pub fn exec_command(command: &Vec<String>) -> Result<(), String> {
String::from_utf8_lossy(&output.stderr)
));
}
Ok(())
let output_str = String::from_utf8_lossy(&output.stdout).to_string();
Ok(output_str)
}