fix: Correct Pest grammar and update ItemService initialization

Co-authored-by: aider (openai/andrew/openrouter/sonoma-sky-alpha) <aider@aider.chat>
This commit is contained in:
Andrew Phillips
2025-09-10 16:14:00 -03:00
parent 84bf7ac5f4
commit 0d68f39c08
4 changed files with 27 additions and 2 deletions

View File

@@ -396,6 +396,29 @@ impl Settings {
}
/// Get server password from password_file or directly from config if configured
pub fn get_server_password(&self) -> Result<Option<String>> {
if let Some(server) = &self.server {
// First check for password_file
if let Some(password_file) = &server.password_file {
debug!("CONFIG: Reading password from file: {:?}", password_file);
let password = fs::read_to_string(password_file)
.with_context(|| format!("Failed to read password file: {:?}", password_file))?
.trim()
.to_string();
return Ok(Some(password));
}
// Fall back to direct password field
if let Some(password) = &server.password {
debug!("CONFIG: Using password from config");
return Ok(Some(password.clone()));
}
}
Ok(None)
}
/// Get server password from password_file or directly from config if configured
pub fn get_server_password(&self) -> Result<Option<String>> {
if let Some(server) = &self.server {