1
0
Fork 0
mirror of https://github.com/fog/fog.git synced 2022-11-09 13:51:43 -05:00

[core] handle busted ENV['HOME']. thanks pfalcone

closes #301
This commit is contained in:
geemus 2011-05-13 12:58:40 -07:00
parent f9ec30cf3a
commit 53de3d04f9

View file

@ -19,7 +19,7 @@ module Fog
# @return [String] The path for configuration_file
def self.credentials_path
@credential_path ||= begin
path = ENV["FOG_RC"] || (ENV['HOME'] && '~/.fog')
path = ENV["FOG_RC"] || (ENV['HOME'] && File.directory?(ENV['HOME']) && '~/.fog')
File.expand_path(path) if path
end
end