-
Notifications
You must be signed in to change notification settings - Fork 381
AWS config ini quirks #238
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
Comments
Hi,
Sorry I couldn't understand what is the problem here?
Why are section names being case insensitive a problem? |
I know, it's a weird one. I previously reported #217, and I've run into it again. When you use
Because the section names are case sensitive, I can't use I've hacked around this with a regex that lowercases all the keys before passing it though to go-ini, but thought I'd raise it here in case you had a better solution. |
Ah OK, I see the problem here. AWS's
Just to be clear, AWS wants section names to be case sensitive and key names case insensitive? If so, does AWS ever have a section name not in lower case? |
Yes, that's how the aws cli currently interprets the user config. Any tool wanting to also use the config needs to replicate the aws cli parsing quirks |
I think Problem 1 (default section confusion) won't be an issue if we find a solution to Problem 2 (case sensitivity differences between sections and keys) |
Thanks, could you also answer the second part of the question? "... If so, does AWS ever have a section name not in lower case?" |
Yes, the aws config file can have section names that not in lower case. Here's an example. [profile foo]
Mfa_Serial=xxxxxxx
[profile FOO]
mfa_serial=yyyyyyy The section name are case sensitive. Profile The key names are case insensitive. An |
Hello, @unknwon I want to have a try to resolve this issue. Solution 1: Only one option
Solution 2: Add two options
Which one do you think is better? |
Uh oh!
There was an error while loading. Please reload this page.
The AWS ini config has a few quirks that are hard to handle with this library
[default]
, not[DEFAULT]
as go-ini defaults to. This is an issue when usingini.Insensitive = true
, as the real default section name also reports asdefault
. Could there be some way to override the default section when usingini.DefaultHeader = true
?Insensitive
handles both keys and sections with the one setting. Could there be a way to separate this?The text was updated successfully, but these errors were encountered: