1
0
Fork 0
mirror of https://github.com/nix-community/home-manager synced 2024-12-24 10:49:48 +01:00

home-environment: use relative latest profile link

Using a relative path prevents the latest version from being garbage
collected.
This commit is contained in:
Richard Yang 2017-08-22 04:43:03 +00:00 committed by Robert Helgesson
parent 5c098dc7ad
commit 42f5d4404d
No known key found for this signature in database
GPG key ID: C3DB11069E65DC86

View file

@ -359,7 +359,7 @@ in
if [[ ! -v oldGenPath || "$oldGenPath" != "$newGenPath" ]] ; then
echo "Creating profile generation $newGenNum"
$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 $(basename "$newGenProfilePath") "$genProfilePath"
$DRY_RUN_CMD ln -Tsf $VERBOSE_ARG "$newGenPath" "$newGenGcPath"
else
echo "No change so reusing latest profile generation $oldGenNum"