Merge pull request 'generate-hardware-config: remove backup file after we are done' (#2303) from hardware into main

This commit is contained in:
clan-bot
2024-11-04 14:10:37 +00:00

View File

@@ -180,6 +180,8 @@ def generate_machine_hardware_info(opts: HardwareGenerateOptions) -> HardwareRep
) )
try: try:
show_machine_hardware_platform(opts.flake.path, opts.machine) show_machine_hardware_platform(opts.flake.path, opts.machine)
if backup_file:
backup_file.unlink(missing_ok=True)
except ClanCmdError as e: except ClanCmdError as e:
log.exception("Failed to evaluate hardware-configuration.nix") log.exception("Failed to evaluate hardware-configuration.nix")
# Restore the backup file # Restore the backup file