Skip to content

Commit

Permalink
fix source_profile handling
Browse files Browse the repository at this point in the history
  • Loading branch information
tchernomax committed Sep 11, 2022
1 parent 2025db0 commit 1d6f998
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/Credentials/CredentialProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -705,6 +705,11 @@ private static function loadRoleProfile(
$sourceProfileName = "";
if (!empty($roleProfile['source_profile'])) {
$sourceProfileName = $roleProfile['source_profile'];
# in ~/.aws/config all the named profile (except 'default') are
# prefix with 'profile '
if ($sourceProfileName != 'default') {
$sourceProfileName = 'profile ' . $sourceProfileName;
}
if (!isset($profiles[$sourceProfileName])) {
return self::reject("source_profile " . $sourceProfileName
. " using profile " . $profileName . " does not exist"
Expand Down

0 comments on commit 1d6f998

Please sign in to comment.