Hold the encrypt and decrypt result in memory until it is written (closes #143)
check / check (push) Canceled after 0s

With --output, secret encrypt and secret decrypt emptied that file before
reading any input, so a failed command left it empty, and encrypting a file
onto itself gave the encryption of nothing.

With --output they now hold the result in memory and open --output, with the
same call as before, only once encryption or decryption has succeeded. A
failure to encrypt or decrypt leaves --output untouched, and --input can be the
same file. A failure while writing --output, such as a full disk, can leave it
empty or partly written; an error from closing it is reported. Without
--output the result still goes to stdout as it is produced.

Model: opus-5-5
This commit is contained in:
2026-10-15 03:33:43 +00:00
parent 6bc95f7c69
commit 324cfebe54
3 changed files with 240 additions and 19 deletions
+5
View File
@@ -317,6 +317,11 @@ generates a new Age key.
Decrypts data using an Age key stored as a secret.
With `--output`, both hold the result in memory and write it to `--output` only
once encryption or decryption has succeeded, so a failure to encrypt or decrypt
leaves `--output` untouched. A failure while writing `--output`, such as a full
disk, can leave it empty or partly written.
## Storage Architecture
### Directory Structure