From 48de6b9821e077c097d1e7b8055ebdad91ef2670 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 7 Apr 2026 20:20:36 +0000 Subject: [PATCH] fix(installer): improve error handling for deployed flake.nix write Agent-Logs-Url: https://github.com/naturallaw777/staging_alpha/sessions/b7dfaecc-2b2e-4f5f-bb9a-f97ced90e76e Co-authored-by: naturallaw777 <99053422+naturallaw777@users.noreply.github.com> --- iso/installer.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/iso/installer.py b/iso/installer.py index 0752db9..3bd189c 100644 --- a/iso/installer.py +++ b/iso/installer.py @@ -956,12 +956,16 @@ class InstallerWindow(Adw.ApplicationWindow): run(["sudo", "rm", "-rf", path]) GLib.idle_add(append_text, buf, "Writing deployed flake.nix...\n") - subprocess.run( + proc = subprocess.run( ["sudo", "tee", "/mnt/etc/nixos/flake.nix"], input=DEPLOYED_FLAKE, + capture_output=True, text=True, - check=True, ) + log(proc.stdout) + if proc.returncode != 0: + log(proc.stderr) + raise RuntimeError(proc.stderr.strip() or "Failed to write deployed flake.nix") run(["sudo", "rm", "-f", "/mnt/etc/nixos/flake.lock"]) GLib.idle_add(self.push_create_password)