Skip to content

Commit

Permalink
Support diskutil apfs list not returning a FileVault attribute (#1378)
Browse files Browse the repository at this point in the history
  • Loading branch information
cole-h authored Jan 9, 2025
1 parent 0ba8809 commit 8879da1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/action/macos/encrypt_apfs_volume.rs
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ impl EncryptApfsVolume {
plist::from_bytes(&output.stdout).map_err(Self::error)?;
for container in parsed.containers {
for volume in container.volumes {
if volume.name.as_ref() == Some(&name) && volume.file_vault {
if volume.name.as_ref() == Some(&name) && volume.file_vault.unwrap_or(false) {
return Ok(StatefulAction::completed(Self {
determinate_nix,
disk,
Expand Down
2 changes: 1 addition & 1 deletion src/os/darwin/diskutil.rs
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ pub struct DiskUtilApfsContainer {
#[serde(rename_all = "PascalCase")]
pub struct DiskUtilApfsListVolume {
pub name: Option<String>,
pub file_vault: bool,
pub file_vault: Option<bool>,
}

#[derive(serde::Deserialize, Clone, Debug)]
Expand Down

0 comments on commit 8879da1

Please sign in to comment.