oddlama/agenix-rekey

wg: Trailing characters found after key

bbigras opened this issue · 1 comments

❯ wg genkey | tee /dev/stdout | wg pubkey
/run/current-system/sw/bin/wg: Trailing characters found after key

❯ wg genkey | tee /dev/stdout
aBEpDuFghYG3CZOwU4Q19aiUDiZaTxeVfHyHRcI0FHI=
aBEpDuFghYG3CZOwU4Q19aiUDiZaTxeVfHyHRcI0FHI=

❯ echo $SHELL
/run/current-system/sw/bin/zsh

Ugh good catch. For an interactive terminal /dev/tty would work, but this should probably be replaced with the equivalent of this:

priv=$(wg genkey)
wg pubkey <<< "$priv" > out.pub
echo "$priv"