Skip to content
This repository has been archived by the owner on Jan 4, 2021. It is now read-only.

Commit

Permalink
Merge pull request #584 from ripienaar/583
Browse files Browse the repository at this point in the history
(#583) correctly expand path in token configuration
  • Loading branch information
ripienaar committed Mar 19, 2019
2 parents 8e42f90 + f59b542 commit 55bcb12
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/mcollective/signer/choria.rb
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,13 @@ def token
env = @config.pluginconf["choria.security.request_signer.token_environment"]

if file
file = File.expand_path(file)

unless File.exist?(file)
raise("No token found in %s, please authenticate using your configured authentication service" % file)
end

return File.read(File.expand_path(file)).chomp
return File.read(file).chomp
end

raise("could not find token in environment variable %s" % env) unless ENV[env]
Expand Down

0 comments on commit 55bcb12

Please sign in to comment.