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

pulp config refuses to work in case the config file is not valid #156

Closed
thmo opened this issue Feb 18, 2021 · 1 comment · Fixed by #196
Closed

pulp config refuses to work in case the config file is not valid #156

thmo opened this issue Feb 18, 2021 · 1 comment · Fixed by #196
Labels
bug Something isn't working (template-set)
Milestone

Comments

@thmo
Copy link
Contributor

thmo commented Feb 18, 2021

When the existing config file is not valid, not even editing the config file works:

$ pulp config edit              
Usage: pulp [OPTIONS] COMMAND [ARGS]...
Try 'pulp --help' for help.

Error: Invalid value for '--format': invalid choice: jsonn. (choose from json, yaml, none)

In this special case, pulp --format=json config edit helps.

In general though, if the config file fails to parse, it would be nice to get a warning and still be able to run the pulp config ... commands.

@daviddavis daviddavis added the bug Something isn't working (template-set) label Feb 18, 2021
@mdellweg
Copy link
Member

I think, this means we need a way to verify the config (beyond the fact that it's valid toml) and reject using it with a warning.
Issuing an error blocks the config commands, and providing a way to not use a config file is no better than the workaround described in the issue.
Maybe we can ask the user for confirmation before continuing without the config.

mdellweg added a commit to mdellweg/pulp-cli that referenced this issue Apr 7, 2021
@mdellweg mdellweg added this to the 0.8.0 milestone Apr 7, 2021
mdellweg added a commit that referenced this issue Apr 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working (template-set)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants