mirror of
https://github.com/nix-community/home-manager.git
synced 2025-12-11 19:41:08 +01:00
Avoid undefined variables in activation script
This commit is contained in:
parent
fea693ba16
commit
4f1eec8180
3 changed files with 17 additions and 8 deletions
|
|
@ -281,7 +281,7 @@ in
|
|||
}
|
||||
|
||||
function cleanOldGen() {
|
||||
if [[ -z "$oldGenPath" ]] ; then
|
||||
if [[ ! -v oldGenPath ]] ; then
|
||||
return
|
||||
fi
|
||||
|
||||
|
|
@ -294,7 +294,7 @@ in
|
|||
| xargs -0 bash ${cleanup} "$newGenFiles" "$oldGenFiles"
|
||||
}
|
||||
|
||||
if [[ "$oldGenPath" != "$newGenPath" ]] ; then
|
||||
if [[ ! -v oldGenPath || "$oldGenPath" != "$newGenPath" ]] ; then
|
||||
$DRY_RUN_CMD ln -Tsf $VERBOSE_ARG "$newGenPath" "$newGenProfilePath"
|
||||
$DRY_RUN_CMD ln -Tsf $VERBOSE_ARG "$newGenProfilePath" "$genProfilePath"
|
||||
$DRY_RUN_CMD ln -Tsf $VERBOSE_ARG "$newGenPath" "$newGenGcPath"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue