logo

qmk_firmware

custom branch of QMK firmware git clone https://anongit.hacktivis.me/git/qmk_firmware.git
commit: 0a5b8928202078a7a64b7fadf11b0fc25a26b4a6
parent 53a0cdc4467fb688faa2708fe75daa26686e918d
Author: Ryan <fauxpark@gmail.com>
Date:   Thu, 20 Jun 2024 04:43:23 +1000

[CLI] Force `dump_lines()` to always use Unix line endings (#23954)


Diffstat:

Mlib/python/qmk/commands.py4+++-
1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/lib/python/qmk/commands.py b/lib/python/qmk/commands.py @@ -102,7 +102,9 @@ def dump_lines(output_file, lines, quiet=True): output_file.parent.mkdir(parents=True, exist_ok=True) if output_file.exists(): output_file.replace(output_file.parent / (output_file.name + '.bak')) - output_file.write_text(generated, encoding='utf-8') + with open(output_file, 'w', encoding='utf-8', newline='\n') as f: + f.write(generated) + # output_file.write_text(generated, encoding='utf-8', newline='\n') # `newline` needs Python 3.10 if not quiet: cli.log.info(f'Wrote {output_file.name} to {output_file}.')