From 337313b0bb4f09583617e2f366de509bc42ca19a Mon Sep 17 00:00:00 2001 From: Jack Chakany Date: Mon, 17 Mar 2025 09:32:12 -0400 Subject: [PATCH] fix macos wanting to ask for password on startup by making app id match --- Cargo.lock | 2 +- Cargo.toml | 2 +- src/keystorage/mod.rs | 13 +++++++------ 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 8dc9e07..6d0b218 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2049,7 +2049,7 @@ dependencies = [ ] [[package]] -name = "hoot-app" +name = "hoot" version = "0.1.0" dependencies = [ "anyhow", diff --git a/Cargo.toml b/Cargo.toml index 4e5d609..26fe5ae 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "hoot-app" +name = "hoot" version = "0.1.0" authors = ["Jack Chakany "] edition = "2021" diff --git a/src/keystorage/mod.rs b/src/keystorage/mod.rs index 098d72d..9f6c7c5 100644 --- a/src/keystorage/mod.rs +++ b/src/keystorage/mod.rs @@ -9,10 +9,7 @@ use linux::LinuxKeyStorage; use macos::MacOSKeyStorage; // for macos keychain service name -#[cfg(debug_assertions)] -const SERVICE_NAME: &'static str = "com.chakanysystems.hoot-dev"; -#[cfg(not(debug_assertions))] -const SERVICE_NAME: &'static str = "com.chakanysystems.hoot"; +const SERVICE_NAME: &'static str = "hoot"; pub enum Error { IOError(std::io::Error), @@ -37,7 +34,9 @@ impl std::fmt::Debug for Error { Error::Addition(key) => write!(f, "Could not add key {}", key), Error::Removal(key) => write!(f, "Could not remove key {}", key), Error::KeyNotFound => write!(f, "Could not find key in keystore"), - Error::UnwrappingFailed(err) => write!(f, "Couldn't unwrap gift wrapped event: {}", err) + Error::UnwrappingFailed(err) => { + write!(f, "Couldn't unwrap gift wrapped event: {}", err) + } } } } @@ -49,7 +48,9 @@ impl std::fmt::Display for Error { Error::Addition(key) => write!(f, "Could not add key {}", key), Error::Removal(key) => write!(f, "Could not remove key {}", key), Error::KeyNotFound => write!(f, "Could not find key in keystore"), - Error::UnwrappingFailed(err) => write!(f, "Couldn't unwrap gift wrapped event: {}", err) + Error::UnwrappingFailed(err) => { + write!(f, "Couldn't unwrap gift wrapped event: {}", err) + } } } }