ryantm / agenix

age-encrypted secrets for NixOS and Home manager
https://matrix.to/#/#agenix:nixos.org
Creative Commons Zero v1.0 Universal
1.51k stars 117 forks source link

Under some circumstances -o is passed multiple times, causing rage to fail #245

Closed lf- closed 7 months ago

lf- commented 7 months ago

I was running agenix -i ~/.ssh/age-identities.txt -r and observed that rage was invoked wrongly.

Here is a snippet of strace output:

[pid 85487] execve("/nix/store/h5wgz7yszcnqp4x1y57abi5ha1d4fqiv-rage-0.10.0/bin/rage", ["/
nix/store/h5wgz7yszcnqp4x1y57ab"..., "--decrypt", "--identity", "/home/jade/.ssh/age-ident
ities.t"..., "-o", "/tmp/jade/nix-shell.CTStd7/tmp.f"..., "-o", "/tmp/jade/nix-shell.CTStd
7/tmp.2"..., "acme-dns-reg.age"], 0x5444a0 /* 129 vars */) = 0
error: the argument '--output <OUTPUT>' cannot be used multiple times

Usage: rage [--encrypt] (-r RECIPIENT | -R PATH)... [-i IDENTITY] [-a] [-o OUTPUT] [INPUT]
       rage [--encrypt] --passphrase [-a] [-o OUTPUT] [INPUT]
       rage --decrypt [-i IDENTITY] [-o OUTPUT] [INPUT]
[pid 85487] +++ exited with 2 +++

agenix version: 0.14.0 age binary path: /nix/store/h5wgz7yszcnqp4x1y57abi5ha1d4fqiv-rage-0.10.0/bin/rage age version: rage 0.10.0

lf- commented 7 months ago

Problem mysteriously vanishes in 0.15.0. Unsure why.

iclanzan commented 2 months ago

I am having this issue on version 0.15.0 too.