Skip to content

Commit

Permalink
qmk format-json: Force Unix line endings and ensure LF at EOF (#22901)
Browse files Browse the repository at this point in the history
  • Loading branch information
fauxpark authored Jan 16, 2024
1 parent a522b1f commit 2b09659
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/python/qmk/cli/format/json.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,8 @@ def format_json(cli):
output = json.dumps(json_data, cls=json_encoder, sort_keys=True)

if cli.args.inplace:
with open(cli.args.json_file, 'w+', encoding='utf-8') as outfile:
outfile.write(output)
with open(cli.args.json_file, 'w+', encoding='utf-8', newline='\n') as outfile:
outfile.write(output + '\n')

# Display the results if print was set
# We don't operate in-place by default, so also display to stdout
Expand Down

0 comments on commit 2b09659

Please sign in to comment.