Foxboron / age-plugin-tpm

:key: TPM 2.0 plugin for age
MIT License
82 stars 7 forks source link

Move prompts to stderr #26

Open dcousens opened 3 months ago

dcousens commented 3 months ago

I think it would be better to print prompts like https://github.com/Foxboron/age-plugin-tpm/blob/5dedd8a6a240ef68851884fe850293e3cc954ac6/cmd/age-plugin-tpm/main.go#L90-L100 to stderr, ~as is common in POSIX applications~.

This became problematic for me when I was trying the following:

age-plugin-tpm --generate --pin > test.tpm

And the prompt didn't show

dcousens commented 3 months ago

Actually, I don't know what the convention is, but stderr seems an easier option than stdout?

Foxboron commented 3 months ago

I don't think stderr is appropriate, but I'll research it a bit.