qmk format-json
: Expose full key path and respect sort_keys
(#20836)
This commit is contained in:
parent
102c42b14b
commit
6d90fa2300
9 changed files with 48 additions and 52 deletions
|
@ -57,7 +57,7 @@ def c2json(cli):
|
|||
cli.args.output.parent.mkdir(parents=True, exist_ok=True)
|
||||
if cli.args.output.exists():
|
||||
cli.args.output.replace(cli.args.output.parent / (cli.args.output.name + '.bak'))
|
||||
cli.args.output.write_text(json.dumps(keymap_json, cls=InfoJSONEncoder))
|
||||
cli.args.output.write_text(json.dumps(keymap_json, cls=InfoJSONEncoder, sort_keys=True))
|
||||
|
||||
if not cli.args.quiet:
|
||||
cli.log.info('Wrote keymap to %s.', cli.args.output)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue