lib/cloudstack-cli/commands/environment.rb in cloudstack-cli-1.6.8 vs lib/cloudstack-cli/commands/environment.rb in cloudstack-cli-1.6.9

- old
+ new

@@ -43,11 +43,11 @@ if env config = {env => config} config[:default] = env if options[:default] end - if File.exists? options[:config_file] + if File.exist? options[:config_file] old_config = parse_config_file if !env || old_config.has_key?(env) say "This environment already exists!", :red exit unless yes?("Do you want to override your settings? [y/N]", :yellow) end @@ -115,10 +115,10 @@ end no_commands do def parse_config_file - if File.exists? options[:config_file] + if File.exist? options[:config_file] begin return YAML::load(IO.read(options[:config_file])) rescue say "Error loading configuration from file #{options[:config_file]}.", :red exit 1