-
Couldn't load subscription status.
- Fork 1.2k
fix source_profile handling #2519
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -705,6 +705,12 @@ 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 ($filename == (self::getHomeDir() . '/.aws/config') && | ||
| $sourceProfileName != 'default') { | ||
| $sourceProfileName = 'profile ' . $sourceProfileName; | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Would you please be able to add a check here for whether |
||
| } | ||
| if (!isset($profiles[$sourceProfileName])) { | ||
| return self::reject("source_profile " . $sourceProfileName | ||
| . " using profile " . $profileName . " does not exist" | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you please remove the condition
$filename == (self::getHomeDir() . '/.aws/config')since I do no think is needed. You can leave the other condition$sourceProfileName != 'default'.