Fix not stripping newlines out of vault password files

Fixes #5
This commit is contained in:
Ethan Paul 2024-03-21 18:16:43 -04:00
parent 67af43ce43
commit 5c97b869a8
Signed by: enpaul
GPG Key ID: 4884CA087E5A472D
1 changed files with 1 additions and 1 deletions

View File

@ -370,7 +370,7 @@ def _load_password(
if fpath:
try:
with Path(fpath).resolve().open("rb") as infile:
return VaultSecret(infile.read())
return VaultSecret(infile.read().strip())
except (FileNotFoundError, PermissionError) as err:
raise RuntimeError(
f"Specified vault password file '{fpath}' does not exist or is unreadable"