lib/heirloom/cli/shared.rb in heirloom-0.4.0 vs lib/heirloom/cli/shared.rb in heirloom-0.4.1rc1

- old
+ new

@@ -30,8 +30,22 @@ config.access_key = opts[:key] if opts[:key_given] config.secret_key = opts[:secret] if opts[:secret_given] config end + def ensure_domain_exists(args) + config = args[:config] + name = args[:name] + logger = config.logger + + archive = Archive.new :name => name, + :config => config + + unless archive.domain_exists? + logger.error "Heirloom domain does not exist." + exit 1 + end + end + end end end