Skip to content
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

Handle parsing of special comment characters in configuration #766

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion pkg/granted/registry/cfregistry/cfregistry.go
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,12 @@ func (r *Registry) AWSProfiles(ctx context.Context) (*ini.File, error) {
}
}

result := ini.Empty()
result := ini.Empty(
ini.LoadOptions{
SpaceBeforeInlineComment: true,
UnescapeValueCommentSymbols: true,
},
)

for _, profile := range profiles {

Expand Down
7 changes: 6 additions & 1 deletion pkg/granted/registry/gitregistry/gitregistry.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,12 @@ func (r Registry) AWSProfiles(ctx context.Context) (*ini.File, error) {

// load all cloned configs of a single repo into one ini object.
// this will overwrite if there are duplicate profiles with same name.
result := ini.Empty()
result := ini.Empty(
ini.LoadOptions{
SpaceBeforeInlineComment: true,
UnescapeValueCommentSymbols: true,
},
)

for _, cfile := range cfg.AwsConfigPaths {
var filepath string
Expand Down
2 changes: 1 addition & 1 deletion pkg/granted/sso.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ var SSOCommand = cli.Command{

const (
// permission for user to read/write.
USER_READ_WRITE_PERM = 0644
USER_READ_WRITE_PERM = 0644
)

// in dev:
Expand Down
Loading