Closed SirRandom closed 3 years ago
We need to improve the error message, but the issue here is that age is refusing to use stdin for both the passphrase and the input. We could read one line for the passphrase and then consider the rest the input, but it feels like something that's easy to get wrong.
Ok, so the logic will have to be a bit more complicated to be safe, since we don't want to read both passphrase and input from a pipe, but doing it from a terminal sounds reasonable, and I think we can make the behavior cross-platform.
Environment
What I was trying to do
Not sure if I have the correct cmdline for this but I was trying to password-encrypt some arbitrary words from stdin using
What happened
Seems like age is trying to open
/dev/tty
which does not exist on Windows.Command line:
age -p -o out