Skip to content

Fix configure get to support printing section values#10432

Open
Dreamstick9 wants to merge 1 commit into
aws:developfrom
Dreamstick9:fix/configure-get-section-support
Open

Fix configure get to support printing section values#10432
Dreamstick9 wants to merge 1 commit into
aws:developfrom
Dreamstick9:fix/configure-get-section-support

Conversation

@Dreamstick9

Copy link
Copy Markdown
Contributor

Description of changes:

aws configure get previously returned an error when the requested
config key pointed to a section (dict) instead of a scalar value.
For example:

$ aws configure get s3  
varname (s3) must reference a value, not a section or sub-section.  

This PR fixes that by printing the section's key-value pairs in
config file format:

$ aws configure get s3  
signature_version = s3v4  

Changes:

  • awscli/customizations/configure/get.py: Handle dict values in
    ConfigureGetCommand by printing each key-value pair instead of
    returning an error.
  • tests/unit/customizations/configure/test_get.py: Updated
    test_get_section_returns_error to assert the correct output
    instead of the old error behavior.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@Dreamstick9 Dreamstick9 requested a review from a team as a code owner June 22, 2026 14:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant