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/generate/layouts.py | |
parent | 1a7f2c8f453d4da6ed8622e52d5b788bc6dad480 (diff) |
Fix generated file output while target exists (#12062)
Diffstat (limited to 'lib/python/qmk/cli/generate/layouts.py')
-rwxr-xr-x | lib/python/qmk/cli/generate/layouts.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/python/qmk/cli/generate/layouts.py b/lib/python/qmk/cli/generate/layouts.py index 15b289522e..a738edfe64 100755 --- a/lib/python/qmk/cli/generate/layouts.py +++ b/lib/python/qmk/cli/generate/layouts.py @@ -25,7 +25,7 @@ def generate_layouts(cli): """ # Determine our keyboard(s) if not cli.config.generate_layouts.keyboard: - cli.log.error('Missing paramater: --keyboard') + cli.log.error('Missing parameter: --keyboard') cli.subcommands['info'].print_help() return False @@ -92,7 +92,7 @@ def generate_layouts(cli): if cli.args.output: cli.args.output.parent.mkdir(parents=True, exist_ok=True) if cli.args.output.exists(): - cli.args.output.replace(cli.args.output.name + '.bak') + cli.args.output.replace(cli.args.output.parent / (cli.args.output.name + '.bak')) cli.args.output.write_text(layouts_h) if not cli.args.quiet: |