cevoaustralia / aws-google-auth

Provides AWS STS credentials based on Google Apps SAML SSO auth (what a jumble!)
MIT License
537 stars 181 forks source link

When prompting for password, flush stdout after printing the prompt if stdin is not tty #126

Closed eudyj closed 5 years ago

eudyj commented 5 years ago

We're using aws_google_auth as a child process of a node script using child_process.exec. On Windows, stdout is not being flushed after writing the password prompt, which means the node script doesn't capture it and write it to the screen. The script still works -- a user can blindly type their password and press enter, after which they will see the password prompt and the rest of the output. But adding a sys.stdout.flush() right after writing the prompt ensures it will output correctly when run as a child process.

coveralls commented 5 years ago

Coverage Status

Coverage increased (+0.07%) to 45.855% when pulling 82628f7787ce0030f12ebb83789bde491158d244 on inmar:master into 7f49fd91e78dcf5578edaea68ef873529320a46d on cevoaustralia:master.