mirror of
https://github.com/nix-community/home-manager
synced 2024-11-27 05:29:46 +01:00
home-manager: show full script path on activation error
Run the activation script in its original nix-store location so that Bash error messages show the real script location instead of 'wrkdir', which gets deleted right after the script exits.
This commit is contained in:
parent
02f0d92df7
commit
ac3a251f5c
1 changed files with 2 additions and 1 deletions
|
@ -91,8 +91,9 @@ function doSwitch() {
|
||||||
local wrkdir
|
local wrkdir
|
||||||
wrkdir="$(mktemp -d)"
|
wrkdir="$(mktemp -d)"
|
||||||
|
|
||||||
|
local generation
|
||||||
local exitCode=0
|
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
|
# Because the previous command never fails, the script keeps running and
|
||||||
# $wrkdir is always removed.
|
# $wrkdir is always removed.
|
||||||
|
|
Loading…
Reference in a new issue