From 5a4a1d0c20d02da7d8b2ee189bc000d3b534ef56 Mon Sep 17 00:00:00 2001 From: Ryan Yin Date: Sat, 10 Oct 2026 08:28:50 +0800 Subject: [PATCH] fix(darwin): run the rollback as root darwin-rebuild rejects switch, activate, rollback and check unless it runs as root, so the recipe could only ever print an error. --- utils.nu | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/utils.nu b/utils.nu index 9f4716a1..9889dff0 100644 --- a/utils.nu +++ b/utils.nu @@ -70,5 +70,6 @@ export def darwin-switch [ } export def darwin-rollback [] { - ./result/sw/bin/darwin-rebuild --rollback + # darwin-rebuild refuses switch/activate/rollback/check unless it runs as root. + sudo -E ./result/sw/bin/darwin-rebuild --rollback }