File tree Expand file tree Collapse file tree 4 files changed +9
-9
lines changed Expand file tree Collapse file tree 4 files changed +9
-9
lines changed Original file line number Diff line number Diff line change 11Unreleased Changes
22------------------
33
4+ * Issue - Fix ` Aws::ProcessCredentials ` warning in cases where shared config is used.
5+
463.201.0 (2024-07-02)
57------------------
68
Original file line number Diff line number Diff line change @@ -84,7 +84,7 @@ def static_profile_credentials(options)
8484 def static_profile_process_credentials ( options )
8585 if Aws . shared_config . config_enabled? && options [ :config ] && options [ :config ] . profile
8686 process_provider = Aws . shared_config . credential_process ( profile : options [ :config ] . profile )
87- ProcessCredentials . new ( process_provider ) if process_provider
87+ ProcessCredentials . new ( [ process_provider ] ) if process_provider
8888 end
8989 rescue Errors ::NoSuchProfileError
9090 nil
@@ -117,9 +117,9 @@ def shared_credentials(options)
117117
118118 def process_credentials ( options )
119119 profile_name = determine_profile_name ( options )
120- if Aws . shared_config . config_enabled? &&
121- ( process_provider = Aws . shared_config . credential_process ( profile : profile_name ) )
122- ProcessCredentials . new ( process_provider )
120+ if Aws . shared_config . config_enabled?
121+ process_provider = Aws . shared_config . credential_process ( profile : profile_name )
122+ ProcessCredentials . new ( [ process_provider ] ) if process_provider
123123 end
124124 rescue Errors ::NoSuchProfileError
125125 nil
Original file line number Diff line number Diff line change @@ -339,7 +339,7 @@ def assume_role_process_credentials_from_config(profile)
339339 if @parsed_config
340340 credential_process ||= @parsed_config . fetch ( profile , { } ) [ 'credential_process' ]
341341 end
342- ProcessCredentials . new ( credential_process ) if credential_process
342+ ProcessCredentials . new ( [ credential_process ] ) if credential_process
343343 end
344344
345345 def credentials_from_shared ( profile , _opts )
Original file line number Diff line number Diff line change 44
55module Aws
66 describe 'Credential Resolution Chain' do
7- before ( :each ) do
8- allow_any_instance_of ( ProcessCredentials ) . to receive ( :warn )
9- end
10-
117 let ( :mock_credential_file ) do
128 File . expand_path (
139 File . join (
@@ -35,6 +31,8 @@ module Aws
3531
3632 before ( :each ) do
3733 allow ( InstanceProfileCredentials ) . to receive ( :new ) . and_return ( mock_instance_creds )
34+
35+ expect_any_instance_of ( ProcessCredentials ) . not_to receive ( :warn )
3836 end
3937
4038 describe 'default behavior' do
You can’t perform that action at this time.
0 commit comments