Improve the message when security delete-generic-password is required (#570)

* Improve the message when security delete-generic-password is required

* Spelling

* Use sudo in recommendation
This commit is contained in:
Ana Hobden 2023-08-10 10:42:22 -07:00 committed by GitHub
parent 5e68cf127b
commit b870f97c0e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -252,7 +252,7 @@ impl Action for EncryptApfsVolume {
#[derive(thiserror::Error, Debug)]
pub enum EncryptApfsVolumeError {
#[error("The keychain has an existing password for a non-existing \"{0}\" volume on disk `{1}`, consider removing the password with `security delete-generic-password -a \"{0}\" -s \"Nix Store\" -l \"{1} encryption password\" -D \"Encrypted volume password\"`")]
#[error("The keychain has an existing password for a non-existing \"{0}\" volume on disk `{1}`, consider removing the password with `sudo security delete-generic-password -a \"{0}\" -s \"Nix Store\" -l \"{1} encryption password\" -D \"Encrypted volume password\"`. Note that it's possible to have several passwords stored, so you may need to run this command several times until receiving the message `The specified item could not be found in the keychain.`")]
ExistingPasswordFound(String, PathBuf),
#[error("The keychain lacks a password for the already existing \"{0}\" volume on disk `{1}`, consider removing the volume with `diskutil apfs deleteVolume \"{0}\"` (if you receive error -69888, you may need to run `launchctl bootout system/org.nixos.darwin-store` and `launchctl bootout system/org.nixos.nix-daemon` first)")]
MissingPasswordForExistingVolume(String, PathBuf),