Commit graph

10 commits

Author SHA1 Message Date
Wanja Hentze
40550f0619 fix truncated output when decrypting a large file to stdout via -d
rage intentionally truncates large output when writing to stdout:
55e52c252b/age/src/cli_common/file_io.rs (L219)
but if told to write to "-" instead, it will not truncate:
55e52c252b/age/src/cli_common/file_io.rs (L312)
2023-03-14 18:53:32 +01:00
Wanja Hentze
7dae15b7bc fix -d/--decrypt-only not working correctly for binary data
I had first used `printf` for outputting the data,
but that breaks if the secret itself contains null bytes.

One could fix this by using e.g. `cat`, but looking a bit more at the code
I realized that in the -d case we never need to `mktemp` at all and can
just ask `age` to write directly to stdout by not setting -o.
2023-02-24 09:00:48 +01:00
muvlon
9cf1967039 feature: add -d/--decrypt option to decrypt a file to stdout 2023-02-22 19:20:58 -08:00
Nathan Henrie
283c178469 Add warn and err helpers, use diff -q 2023-02-21 12:46:44 -07:00
Nathan Henrie
d84a99d0b8 Redirect user-directed warnings to stderr 2023-02-21 12:42:19 -07:00
Ryan Mulligan
344c8e41d2 feature: pipe cleartext into agenix -e
If STDIN is not interactive, change EDITOR to `cp /dev/stdin`.

fixes #33
2023-02-19 10:20:07 -08:00
Ryan Mulligan
ec396f7a76 fix: if an identity is specified, don't use the default ones
fixes #151
2023-02-18 11:55:58 -08:00
Ryan Mulligan
d0b75ddf9a contrib: use mkDerivation for agenix cli
* use mkDerivation
* separate shell code in own file
* use shellcheck to lint shell code
* remove rage version check since rage is greater than 0.5.0 on all
  maintained nixpkgs
2023-02-11 13:18:31 -08:00
Ryan Mulligan
adc97bd3c5 add README and examples 2020-09-03 13:16:44 -07:00
Ryan Mulligan
79244b4fc3 add flake and default .nix files; add agenix command 2020-09-03 11:24:33 -07:00