bugfix: Let Mac users specify encryption directly (#546)
This commit is contained in:
parent
3586457624
commit
9c915b3f6a
|
@ -108,25 +108,26 @@ impl Planner for Macos {
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
let encrypt = if self.encrypt == None {
|
let encrypt = match self.encrypt {
|
||||||
let output = Command::new("/usr/bin/fdesetup")
|
Some(choice) => choice,
|
||||||
.arg("isactive")
|
None => {
|
||||||
.stdout(std::process::Stdio::null())
|
let output = Command::new("/usr/bin/fdesetup")
|
||||||
.stderr(std::process::Stdio::null())
|
.arg("isactive")
|
||||||
.process_group(0)
|
.stdout(std::process::Stdio::null())
|
||||||
.output()
|
.stderr(std::process::Stdio::null())
|
||||||
.await
|
.process_group(0)
|
||||||
.map_err(|e| PlannerError::Custom(Box::new(e)))?;
|
.output()
|
||||||
|
.await
|
||||||
|
.map_err(|e| PlannerError::Custom(Box::new(e)))?;
|
||||||
|
|
||||||
let stdout = String::from_utf8_lossy(&output.stdout);
|
let stdout = String::from_utf8_lossy(&output.stdout);
|
||||||
let stdout_trimmed = stdout.trim();
|
let stdout_trimmed = stdout.trim();
|
||||||
if stdout_trimmed == "true" {
|
if stdout_trimmed == "true" {
|
||||||
true
|
true
|
||||||
} else {
|
} else {
|
||||||
false
|
false
|
||||||
}
|
}
|
||||||
} else {
|
},
|
||||||
false
|
|
||||||
};
|
};
|
||||||
|
|
||||||
Ok(vec![
|
Ok(vec![
|
||||||
|
|
Loading…
Reference in a new issue