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

fix: clear omit_containers config with empty flag, fixes #6140 #6202

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jonesrussell
Copy link

Issue

ddev config --omit-containers="" doesn't remove omit_containers from .ddev/config.yaml as expected (#6140).

Solution

This PR clears omit-containers when an empty string is passed. It uses the Changed method, consistent with the global version of the command. Changes are made in handleMainConfigArgs in cmd/ddev/cmd/config.go.

Testing

Manual testing involves running ddev config --omit-containers=db and ddev config --omit-containers="" and checking .ddev/config.yaml. Automated tests will be added to verify the flag's functionality.

Related Issues

Fixes issue #6140.

Deployment

No special deployment actions needed. This change doesn't affect other code.

Copy link

github-actions bot commented May 17, 2024

@rfay
Copy link
Member

rfay commented May 17, 2024

Thanks for this! Could you please evaluate the ddev config global --omit-containers situation also, and poke around just a bit to see if we have other commands that deal with arrays that aren't clear-able?

@rfay
Copy link
Member

rfay commented May 31, 2024

Rebased, looking forward to your work on this.

@rfay
Copy link
Member

rfay commented Jun 6, 2024

Hoping you can take a look, it would be good to get these things taken care of together. Thanks!

@rfay
Copy link
Member

rfay commented Jun 6, 2024

Rebased.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants