Skip to content

Commit

Permalink
Merge pull request #22 from test-kitchen/develop
Browse files Browse the repository at this point in the history
fix file check
  • Loading branch information
danfromtitan committed Nov 9, 2017
2 parents 75625f9 + f7dbbd0 commit 04c5abe
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/kitchen/driver/opennebula.rb
Expand Up @@ -180,12 +180,12 @@ def destroy(state)
def opennebula_connect()
opennebula_creds = nil
if ENV.has_key?('ONE_AUTH')
if File.exists(ENV['ONE_AUTH'])
if File.exist?(ENV['ONE_AUTH'])
opennebula_creds = File.read(ENV['ONE_AUTH'])
else
opennebula_creds = ENV['ONE_AUTH']
end
elsif File.exists?(config[:oneauth_file])
elsif File.exist?(config[:oneauth_file])
opennebula_creds = File.read(config[:oneauth_file])
else
raise ActionFailed, "Could not find one_auth file #{config[:oneauth_file]}"
Expand Down

0 comments on commit 04c5abe

Please sign in to comment.