lib/heirloom/cli/shared.rb in heirloom-0.5.0rc1 vs lib/heirloom/cli/shared.rb in heirloom-0.5.0rc2

- old
+ new

@@ -34,9 +34,20 @@ missing_opts.each {|missing_opt| logger.error missing_opt} exit 1 unless missing_opts.empty? end + def ensure_directory(args) + config = args[:config] + path = args[:path] + logger = config.logger + + unless File.directory? path + logger.error "#{path} is not a directory." + exit 1 + end + end + def ensure_domain_exists(args) config = args[:config] name = args[:name] logger = config.logger