Skip to content

Commit

Permalink
files: make collision error message more helpful
Browse files Browse the repository at this point in the history
Most importantly, also indicate how to use file backup for NixOS and
nix-darwin modules.
  • Loading branch information
Lichthagel authored and rycee committed Apr 29, 2024
1 parent 5632659 commit f8e6694
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion modules/files/check-link-targets.sh
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,12 @@ for sourcePath in "$@" ; do
done

if [[ -v collision ]] ; then
errorEcho "Please move the above files and try again or use 'home-manager switch -b backup' to back up existing files automatically."
errorEcho "Please do one of the following:
- Move or remove the above files and try again.
- In standalone mode, use 'home-manager switch -b backup' to back up
files automatically.
- When used as a NixOS or nix-darwin module, set
'home-manager.backupFileExtension'
to, for example, 'backup' and rebuild."
exit 1
fi

0 comments on commit f8e6694

Please sign in to comment.