1
0
Fork 0

Ensure qmk generate-compilation-database copies to userspace as well. (#23129)

This commit is contained in:
Nick Brassel 2024-02-22 23:47:42 +11:00 committed by GitHub
parent c6668b9cd9
commit 56802f506c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 6 additions and 3 deletions

View file

@ -119,9 +119,10 @@ class BuildTarget:
command = self.compile_command(build_target=build_target, dry_run=True, **env_vars)
from qmk.cli.generate.compilation_database import write_compilation_database # Lazy load due to circular references
output_path = QMK_FIRMWARE / 'compile_commands.json'
write_compilation_database(command=command, output_path=output_path, skip_clean=skip_clean, **env_vars)
if output_path.exists() and HAS_QMK_USERSPACE:
ret = write_compilation_database(command=command, output_path=output_path, skip_clean=skip_clean, **env_vars)
if ret and output_path.exists() and HAS_QMK_USERSPACE:
shutil.copy(str(output_path), str(QMK_USERSPACE / 'compile_commands.json'))
return ret
def compile(self, build_target: str = None, dry_run: bool = False, **env_vars) -> None:
if self._clean or self._compiledb: