FiloSottile / age

A simple, modern and secure encryption tool (and Go library) with small explicit keys, no config options, and UNIX-style composability.
https://age-encryption.org
BSD 3-Clause "New" or "Revised" License
17.07k stars 500 forks source link

if'd out term.IsTerminal/stdinInUse check for Windows #258

Closed SirRandom closed 3 years ago

SirRandom commented 3 years ago

I added a platform check to the password routine. It's a dirty hack imo but it 'resolves' issue #196 by wholesale removing the error check. On Windows, behavior seems nominal with a password being read from stdin, followed by the input.

This is my first time writing Go and my first pull request. Please let me know if I've done anything horribly wrong. 🙏

FiloSottile commented 3 years ago

Thank you for the PR! I ended up fixing it a little differently but it was useful to think through a concrete solution.