How to pass CLI options to heroku pg:psql? -


  • given heroku pg:psql works, connects database
  • and $sql valid sql query
  • when run heroku pg:psql -c $sql
  • then expect see results of query
  • and expect heroku exit status code of 0

instead, -c option ignored, $sql not executed, , interactive prompt shown.

looks bug, sorry :-/

i've reported it.

it appears pg:extras might culprit, , if didn't have that, may work. see here

try

heroku plugins:uninstall heroku-pg-extras 

there's work around - pipe command in:

<<< "select count(*) features;" | heroku pg:psql -a appname -c - 

Comments

Popular posts from this blog

windows - Single EXE to Install Python Standalone Executable for Easy Distribution -

c# - Access objects in UserControl from MainWindow in WPF -

javascript - How to name a jQuery function to make a browser's back button work? -