Skip to content
This repository was archived by the owner on Dec 5, 2023. It is now read-only.
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion lib/redis_console.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ class Heroku::Command::Redis < Heroku::Command::Base
def cli(*queries)
# Must remember to extract these so they don't get passed to redis-cli
db = extract_option("--db") || 'REDISTOGO_URL'
app = extract_app

redis_url = heroku.config_vars(app)[db]
return puts "No such redis (#{db}), try setting --db REDIS_URL." unless redis_url
Expand All @@ -23,4 +22,10 @@ def cli(*queries)

def monitor; cli 'monitor'; end
def info; cli 'info'; end

def app
super
rescue Heroku::Command::CommandFailed
nil
end
end