generate-hardware-config: remove backup file after we are done

This commit is contained in:
Jörg Thalheim
2024-11-04 15:01:32 +01:00
parent a91021dd64
commit 86d8992046

View File

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