Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move prompts to stderr #26

Open
dcousens opened this issue Jul 21, 2024 · 2 comments
Open

Move prompts to stderr #26

dcousens opened this issue Jul 21, 2024 · 2 comments

Comments

@dcousens
Copy link

dcousens commented Jul 21, 2024

I think it would be better to print prompts like

pin, err = GetPin("Enter pin for key:")
if err != nil {
return err
}
clearLine(os.Stdin)
confirm, err := GetPin("Confirm pin:")
if err != nil {
return err
}
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
Copy link
Author

dcousens commented Jul 21, 2024

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

@Foxboron
Copy link
Owner

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants