Merge pull request 'sops: pass empty manifest when decrypting' (#128) from Mic92-mic92 into main
All checks were successful
build / test (push) Successful in 16s

Reviewed-on: #128
This commit is contained in:
Mic92 2023-08-10 10:10:59 +00:00
commit ad31cdb43a

View File

@ -162,7 +162,10 @@ def encrypt_file(
def decrypt_file(secret_path: Path) -> str:
cmd = nix_shell(["sops"], ["sops", "--decrypt", str(secret_path)])
with sops_manifest([]) as manifest:
cmd = nix_shell(
["sops"], ["sops", "--config", str(manifest), "--decrypt", str(secret_path)]
)
res = subprocess.run(cmd, check=True, stdout=subprocess.PIPE, text=True)
return res.stdout