agenix
agenix copied to clipboard
fix: enable running rekey in a non-interactive shell
This PR fixes an issue of rekeying in a non-interactive shell.
With the current code, EDITOR will be set to cp -- /dev/stdin in a non-interactive shell and hence the CLEARTEXT_FILE will be overwritten with an empty string - effectively erasing the secret value. This PR fixes that by only calling editor if we're not rekeying.