mirror of
https://codeberg.org/icewind/secretfile.git
synced 2026-06-03 08:34:10 +02:00
parent
9f4da54d03
commit
2dd223c249
2 changed files with 26 additions and 1 deletions
|
|
@ -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")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue