mirror of
https://github.com/nix-community/home-manager.git
synced 2024-12-14 11:57:55 +00:00
home-manager: improve robustness
With this commit the activation script is run only if nix-build succeeded.
This commit is contained in:
parent
a617aeaa73
commit
cbc4188b68
1 changed files with 8 additions and 8 deletions
|
@ -12,14 +12,14 @@ function doRebuild() {
|
|||
local wrkdir
|
||||
wrkdir="$(mktemp -d)"
|
||||
|
||||
nix-build --show-trace \
|
||||
"@HOME_MANAGER_EXPR_PATH@" \
|
||||
--argstr modulesPath "@MODULES_PATH@" \
|
||||
--argstr confPath "$confFile" \
|
||||
-A activation-script \
|
||||
-o "$wrkdir/generation"
|
||||
|
||||
"$wrkdir/generation/activate"
|
||||
if nix-build --show-trace \
|
||||
"@HOME_MANAGER_EXPR_PATH@" \
|
||||
--argstr modulesPath "@MODULES_PATH@" \
|
||||
--argstr confPath "$confFile" \
|
||||
-A activation-script \
|
||||
-o "$wrkdir/generation" ; then
|
||||
"$wrkdir/generation/activate"
|
||||
fi
|
||||
|
||||
rm -r "$wrkdir"
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue