diff --git a/modules/files.nix b/modules/files.nix index a7fd67f57a0b..5ff8d7228c03 100644 --- a/modules/files.nix +++ b/modules/files.nix @@ -177,7 +177,7 @@ in if [[ -e "$targetPath" && ! -L "$targetPath" && -n "$HOME_MANAGER_BACKUP_EXT" ]] ; then # The target exists, back it up backup="$targetPath.$HOME_MANAGER_BACKUP_EXT" - $DRY_RUN_CMD mv $VERBOSE_ARG "$targetPath" "$backup" || errorEcho "Moving '$targetPath' failed!" + $DRY_RUN_CMD mv $VERBOSE_ARG "$targetPath" "$backup" || exit 1 fi if [[ -e "$targetPath" && ! -L "$targetPath" ]] && cmp -s "$sourcePath" "$targetPath" ; then @@ -186,7 +186,7 @@ in else # Place that symlink, --force $DRY_RUN_CMD mkdir -p $VERBOSE_ARG "$(dirname "$targetPath")" - $DRY_RUN_CMD ln -nsf $VERBOSE_ARG "$sourcePath" "$targetPath" + $DRY_RUN_CMD ln -Tsf $VERBOSE_ARG "$sourcePath" "$targetPath" || exit 1 fi done '';