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

cmd/config: ensure that the configuration directory exist #684

Merged
merged 1 commit into from
Feb 28, 2022

Conversation

rolinh
Copy link
Member

@rolinh rolinh commented Feb 24, 2022

hubble config set ... fails to save the configuration file if the
configuration directory doesn't already exist thus requiring the user to
create it beforehand. To address this issue, this commit ensures that
the configuration directory exists when config set is invoked by
creating it when necessary.

Closes: #677

@rolinh rolinh added the release-note/bug This PR fixes an issue in a previous release of Hubble. label Feb 24, 2022
@rolinh rolinh requested review from a team and jrfastab and removed request for a team February 24, 2022 13:11
`hubble config set ...` fails to save the configuration file if the
configuration directory doesn't already exist thus requiring the user to
create it beforehand. To address this issue, this commit ensures that
the configuration directory exists when `config set` is invoked by
creating it when necessary.

Signed-off-by: Robin Hahling <robin.hahling@gw-computing.net>
@rolinh rolinh force-pushed the pr/rolinh/fix-config-dir-missing branch from 18a63b6 to e23d170 Compare February 24, 2022 14:21
Copy link
Member

@kaworu kaworu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure wether newFileOnlyViper is the right place for this logic (vs for example set's command PreRunE), but LGTM.

@gandro gandro merged commit afc6ba0 into master Feb 28, 2022
@gandro gandro deleted the pr/rolinh/fix-config-dir-missing branch February 28, 2022 10:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release-note/bug This PR fixes an issue in a previous release of Hubble.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Trying to set a hubble parameter results in ENOENT.
3 participants