-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
aws/defaults: Export Shared Config/Creds filename helpers #1308
Conversation
108851e
to
94364b6
Compare
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.
LGTM, one minor comment
awstesting/util.go
Outdated
|
||
for _, e := range env { | ||
p := strings.SplitN(e, "=", 2) | ||
os.Setenv(p[0], p[1]) |
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.
This could panic for someone that passed in an invalid string. Should we document that or check for length?
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.
good point, i'll add validation of the length.
94364b6
to
9890f9d
Compare
In aws#1308 the filename was being retrieved with the SharedConfigFilename utility function not SharedCredentialsFilename function.
Exports the shared credentials and shared config filename helper functions to make it easier to get the filename of the credentials and config file.
Corrects a bug in the shared credentials and config HOME path that would return an invalid filename on windows if the
HOME
environment variable was defined.Replaces #1293