-
Notifications
You must be signed in to change notification settings - Fork 9
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
Fixed pretty formatting of first cfbs init commit #182
Conversation
olehermanse
commented
Jan 11, 2024
- De-duplicated cfbs sorting rules
- Renamed sorting rule variables
- Fixed pretty formatting of first cfbs init commit
- Updated imports for top level keys and module keys
Introduced here: cfengine#181 Signed-off-by: Ole Herman Schumacher Elgesem <[email protected]>
One can be local with underscore prefix, the other can use all caps like the other globals. Signed-off-by: Ole Herman Schumacher Elgesem <[email protected]>
Signed-off-by: Ole Herman Schumacher Elgesem <[email protected]>
Signed-off-by: Ole Herman Schumacher Elgesem <[email protected]>
@@ -207,7 +209,10 @@ def init_command(index=None, masterfiles=None, non_interactive=False) -> int: | |||
|
|||
config["git"] = do_git | |||
|
|||
write_json(cfbs_filename(), config) | |||
data = pretty(config, CFBS_DEFAULT_SORTING_RULES) + "\n" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Q: Why not write it through the cfbs_json
object like we do most other things?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@oleorhagen We can and probably should. It looked like a bit more refactoring than I wanted to do in this commit. (I think CFBSConfig class has some quirks which make it a bit weird to work with before there is a .json file, with the expected fields, at the expected path).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Feel free to take a stab at it, shouldn't be very hard.