diff options
author | Joel Challis <git@zvecr.com> | 2021-02-28 20:19:07 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-02-28 20:19:07 +0000 |
commit | 59c7deab0931207016315636ae1ef74c2c54dd18 (patch) | |
tree | 4ebcb8c97c2bee8c3ea6ee3496851184f821729f /lib/python/qmk/cli/json2c.py | |
parent | 1a7f2c8f453d4da6ed8622e52d5b788bc6dad480 (diff) | |
download | qmk_firmware-59c7deab0931207016315636ae1ef74c2c54dd18.tar.gz qmk_firmware-59c7deab0931207016315636ae1ef74c2c54dd18.zip |
Fix generated file output while target exists (#12062)
Diffstat (limited to 'lib/python/qmk/cli/json2c.py')
-rwxr-xr-x | lib/python/qmk/cli/json2c.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/python/qmk/cli/json2c.py b/lib/python/qmk/cli/json2c.py index e7babc0e4..5a2fb96c7 100755 --- a/lib/python/qmk/cli/json2c.py +++ b/lib/python/qmk/cli/json2c.py | |||
@@ -37,7 +37,7 @@ def json2c(cli): | |||
37 | if cli.args.output: | 37 | if cli.args.output: |
38 | cli.args.output.parent.mkdir(parents=True, exist_ok=True) | 38 | cli.args.output.parent.mkdir(parents=True, exist_ok=True) |
39 | if cli.args.output.exists(): | 39 | if cli.args.output.exists(): |
40 | cli.args.output.replace(cli.args.output.name + '.bak') | 40 | cli.args.output.replace(cli.args.output.parent / (cli.args.output.name + '.bak')) |
41 | cli.args.output.write_text(keymap_c) | 41 | cli.args.output.write_text(keymap_c) |
42 | 42 | ||
43 | if not cli.args.quiet: | 43 | if not cli.args.quiet: |