lib/cloudstack-client/helper.rb in cloudstack-cli-0.0.1 vs lib/cloudstack-client/helper.rb in cloudstack-cli-0.0.2
- old
+ new
@@ -1,11 +1,12 @@
module CloudstackClient
class ConnectionHelper
- def self.load_configuration(config_file = File.join(File.dirname(__FILE__), '..', '..', 'config', 'cloudstack.yml'))
+ def self.load_configuration(config_file)
begin
return YAML::load(IO.read(config_file))
rescue Exception => e
- puts "Unable to load '#{config_file}' : #{e}".color(:red)
+ $stderr.puts "Can't find the config file '#{config_file}'"
+ $stderr.puts "Please see https://bitbucket.org/swisstxt/cloudstack-cli under 'Setup'"
exit
end
end
end
end