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
I think it would be better to print prompts like
age-plugin-tpm/cmd/age-plugin-tpm/main.go
Lines 90 to 100 in 5dedd8a
stderr,as is common in POSIX applications.This became problematic for me when I was trying the following:
age-plugin-tpm --generate --pin > test.tpmAnd the prompt didn't show