Skip to content

Commit 3dca567

Browse files
committed
Accept token files with newlines
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.
1 parent ac7e5b4 commit 3dca567

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: tasks/puppet_infra_upgrade.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ def request_object(nodes:, token_file:)
5151

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

5757
request

0 commit comments

Comments
 (0)