heroku / legacy-cli

Heroku CLI
https://cli.heroku.com
MIT License
1.37k stars 382 forks source link

Two-factor auth breaks piping standard input to pg:psql #1135

Open msakrejda opened 10 years ago

msakrejda commented 10 years ago

Two-factor authentication breaks piping input to pg:psql from standard in.

maciek@gamera:~$ <<< "SELECT 1" heroku pg:psql db-corral::crimson
Two-factor code: Invalid two-factor code

pg:psql does support a --command flag, but it's kinda broken. Maybe supporting --file would work around this? Also, because of https://github.com/heroku/heroku-pg-extras/issues/71, any fix to the toolbelt will not fix things for anyone with pg-extras installed--we'd need to either copy the fix for pg-extras or fix pg-extras. (note: no longer the case October 23, 2014 —@will)

Any other ideas?

/cc @heroku/department-of-data

will commented 10 years ago

i have edited the description to strike out the part that is no longer true