mirror of
https://github.com/fog/fog.git
synced 2022-11-09 13:51:43 -05:00
[google|compute] reraise LoadError when google-api-client missing
This commit is contained in:
parent
e759687e03
commit
be97df4ef7
1 changed files with 2 additions and 1 deletions
|
@ -854,8 +854,9 @@ module Fog
|
|||
# NOTE: loaded here to avoid requiring this as a core Fog dependency
|
||||
begin
|
||||
require 'google/api_client'
|
||||
rescue LoadError
|
||||
rescue LoadError => error
|
||||
Fog::Logger.warning("Please install the google-api-client gem before using this provider.")
|
||||
raise error
|
||||
end
|
||||
key = ::Google::APIClient::KeyUtils.load_from_pkcs12(File.expand_path(options[:google_key_location]), 'notasecret')
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue