lib/cloudstack-cli/base.rb in cloudstack-cli-0.7.4 vs lib/cloudstack-cli/base.rb in cloudstack-cli-0.8.0
- old
+ new
@@ -49,9 +49,15 @@
unless config = config[env]
say "Can't find environment #{env}.", :red
exit 1
end
end
+
+ unless config.key?(:url) && config.key?(:api_key) && config.key?(:secret_key)
+ say "The environment #{env || '\'-\''} contains no valid data.", :red
+ say "Please check with 'cs environment list' and set a valid default environment."
+ exit 1
+ end
config
end
def find_project(name = options[:project], allow_all = true)
return nil unless name
\ No newline at end of file