mirror of
https://github.com/Abdess/retrobios.git
synced 2026-06-28 21:32:49 +00:00
fix: text-based YAML patching preserves formatting
replace yaml.dump with surgical text edits for contents/source_ref. preserves comments, block scalars, quoting, indentation. fix FBNeo new entry detection using parsed keys instead of text search.
This commit is contained in:
parent
75e34898ee
commit
427fef5669
2 changed files with 218 additions and 11 deletions
|
|
@ -269,8 +269,8 @@ def run(
|
|||
diff = compute_diff(str(path), str(CACHE_PATH), mode='fbneo')
|
||||
print(_format_diff(path.stem, diff, show_added=is_main))
|
||||
|
||||
if not dry_run and (diff['added'] or diff['updated']):
|
||||
is_main = path.name == 'fbneo.yml'
|
||||
effective_added = diff['added'] if is_main else []
|
||||
if not dry_run and (effective_added or diff['updated']):
|
||||
merge_fbneo_profile(str(path), str(CACHE_PATH), write=True, add_new=is_main)
|
||||
log.info('merged changes into %s', path.name)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue