readme
All checks were successful
CI / checks (push) Successful in 37s

This commit is contained in:
Robin Appelman 2025-05-22 17:35:02 +02:00
commit 2dd223c249
2 changed files with 26 additions and 1 deletions

View file

@ -30,7 +30,7 @@ impl Error for SecretError {}
/// If the provided path includes the `$CREDENTIALS_DIRECTORY` placeholder, it will be replaced with the
/// systemd service credential directory.
///
/// any leading whitespace will be stripped from the returned secret.
/// any trailing whitespace will be stripped from the returned secret.
pub fn load(path: &str) -> Result<String, SecretError> {
let file = if path.contains("$CREDENTIALS_DIRECTORY") {
let dir = var("CREDENTIALS_DIRECTORY")