diff options
| author | Ryan <fauxpark@gmail.com> | 2023-05-20 22:15:05 +1000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-05-20 22:15:05 +1000 |
| commit | 6d90fa2300b463f5cc6920022a445d5ed217124c (patch) | |
| tree | 2b0ae6329af789e81ba5d7313b752e5e828493e0 /lib/python/qmk/cli/c2json.py | |
| parent | 102c42b14bc79a178d16ae5217d739490a312ea4 (diff) | |
`qmk format-json`: Expose full key path and respect `sort_keys` (#20836)
Diffstat (limited to 'lib/python/qmk/cli/c2json.py')
| -rw-r--r-- | lib/python/qmk/cli/c2json.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/python/qmk/cli/c2json.py b/lib/python/qmk/cli/c2json.py index 43110a9387..7f6aca070a 100644 --- a/lib/python/qmk/cli/c2json.py +++ b/lib/python/qmk/cli/c2json.py | |||
| @@ -57,7 +57,7 @@ def c2json(cli): | |||
| 57 | cli.args.output.parent.mkdir(parents=True, exist_ok=True) | 57 | cli.args.output.parent.mkdir(parents=True, exist_ok=True) |
| 58 | if cli.args.output.exists(): | 58 | if cli.args.output.exists(): |
| 59 | cli.args.output.replace(cli.args.output.parent / (cli.args.output.name + '.bak')) | 59 | cli.args.output.replace(cli.args.output.parent / (cli.args.output.name + '.bak')) |
| 60 | cli.args.output.write_text(json.dumps(keymap_json, cls=InfoJSONEncoder)) | 60 | cli.args.output.write_text(json.dumps(keymap_json, cls=InfoJSONEncoder, sort_keys=True)) |
| 61 | 61 | ||
| 62 | if not cli.args.quiet: | 62 | if not cli.args.quiet: |
| 63 | cli.log.info('Wrote keymap to %s.', cli.args.output) | 63 | cli.log.info('Wrote keymap to %s.', cli.args.output) |
