Skip to content

Commit

Permalink
Accept token files with newlines
Browse files Browse the repository at this point in the history
Previously if a token file contained a newline, the upgrade plan would
fail. This commit fixes that bug. Token files with newlines will not
cause an error.
  • Loading branch information
reidmv committed Jul 23, 2021
1 parent ac7e5b4 commit 3dca567
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tasks/puppet_infra_upgrade.rb
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ def request_object(nodes:, token_file:)

request = Net::HTTP::Post.new(inventory_uri.request_uri)
request['Content-Type'] = 'application/json'
request['X-Authentication'] = token
request['X-Authentication'] = token.chomp
request.body = body

request
Expand Down

0 comments on commit 3dca567

Please sign in to comment.