Permalink
Browse files

error catcher for heroku mongo uri

  • Loading branch information...
micahbrich committed Aug 11, 2011
1 parent 3f0c2a7 commit 2b4cad605ca1fe7758cfeb2574c0479c8036370c
Showing with 5 additions and 2 deletions.
  1. +5 −2 lib/heroku/command/mongo.rb
@@ -64,8 +64,11 @@ def transfer(from, to)
def heroku_mongo_uri
config = heroku.config_vars(app)
url = config['MONGO_URL'] || config['MONGOLAB_URI'] || config['MONGOHQ_URL'] || "#{mongo-url}"
- error("Could not find the MONGO_URL for #{app}") if url.blank?
- make_uri(url)
+ if url.empty?
+ error("Could not find the MONGO_URL for #{app}")
+ else
+ make_uri(url)
+ end
end
def mongoid_database

0 comments on commit 2b4cad6

Please sign in to comment.