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

FR: Make jj config edit/path work even if current config is invalid #5235

Open
Jollywatt opened this issue Jan 2, 2025 · 1 comment
Open
Labels
enhancement New feature or request

Comments

@Jollywatt
Copy link

Jollywatt commented Jan 2, 2025

Is your feature request related to a problem? Please describe.
Consider this scenario: you run jj config edit --user and write some invalid TOML to the config file.
All future jj commands immediately fail because the user config can't be parsed, including jj config edit.

Describe the solution you'd like
I would like the jj config subcommands to not require a working config to run.

Describe alternatives you've considered
The error message contains Hint: Check the config file: <path to config.toml> which you can then open in an editor manually

@yuja
Copy link
Contributor

yuja commented Jan 2, 2025

This was discussed before, and the conclusion was that it wouldn't be simple to add special case for jj config subcommands, and so added a hint instead.

For jj config edit and syntax error, the current idea is to parse edited config file, and if invalid, either restore the original or reopen the editor.
#3905

@PhilipMetzger PhilipMetzger added the enhancement New feature or request label Jan 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants