diff --git a/home-manager/home-manager b/home-manager/home-manager index f599d9008..45fe0e1cb 100644 --- a/home-manager/home-manager +++ b/home-manager/home-manager @@ -91,8 +91,9 @@ function doSwitch() { local wrkdir wrkdir="$(mktemp -d)" + local generation local exitCode=0 - doBuild "$wrkdir/generation" && "$wrkdir/generation/activate" || exitCode=1 + generation=$(doBuild "$wrkdir/result") && $generation/activate || exitCode=1 # Because the previous command never fails, the script keeps running and # $wrkdir is always removed.