Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

pull DATABASE_URL via config_vars

This is considerably faster, particularly if your app is not currently
spun up.
  • Loading branch information...
commit df654d5bc0ff84a3dd5648bfe8b002318533ce45 1 parent aa5c1ee
@wuputah authored hone committed
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/heroku/commands/sql.rb
View
4 lib/heroku/commands/sql.rb
@@ -2,10 +2,10 @@ class Heroku::Command::Sql < Heroku::Command::Base
def index
app = extract_app
- database_url = heroku.console(app, "puts ENV['DATABASE_URL']")
+ database_url = heroku.config_vars(app)['DATABASE_URL']
sqlconsole_history_read(app)
-
+
display "SQL console for #{app}.#{heroku.host}"
while sql = Readline.readline('SQL> ')
unless sql.nil? || sql.strip.empty?
Please sign in to comment.
Something went wrong with that request. Please try again.