Bug: `dorothy install` and `setup-system update` attempt to symlink `$DOROTHY` to itself on macOS 15.4 arm64
Summary
When running the install script (bash -ixc "$(curl -fsSL https://dorothy.bevry.me/install)"), I receive the following error:
+ ln -sfF -- /Users/jondpenton/.local/share/dorothy /Users/jondpenton/.local/share/dorothy
ln: /Users/jondpenton/.local/share/dorothy: Directory not empty
Debug Log
Potential Solution
I was able to get dorothy install and setup-system update working by applying the following changes to commands/dorothy:
diff --git a/commands/dorothy b/commands/dorothy
index a9a12f91..d91a2e28 100755
--- a/commands/dorothy
+++ b/commands/dorothy
@@ -667,15 +667,19 @@ function dorothy_() (
function relocate_then_symlink_if_necessary {
local symlink="$1" destination="$2"
relocate_if_necessary "$symlink" "$destination"
- if __is_alpine; then
- # alpine doesn't support -F, however the removals of relocate_if_necessary should make it unnecessary
- ln -sf -- "$destination" "$symlink"
- else
- # -F: replace symlink if directory if needed
- # -f: unlink symlink path if needed
- # -s: symbolic link
- ln -sfF -- "$destination" "$symlink"
+
+ if [[ "$symlink" != "$destination" ]]; then
+ if __is_alpine; then
+ # alpine doesn't support -F, however the removals of relocate_if_necessary should make it unnecessary
+ ln -sf -- "$destination" "$symlink"
+ else
+ # -F: replace symlink if directory if needed
+ # -f: unlink symlink path if needed
+ # -s: symbolic link
+ ln -sfF -- "$destination" "$symlink"
+ fi
fi
+
# cleanup accidents
symlink="$symlink/$(basename -- "$destination")"
if [[ -L $symlink ]]; then
Thanks Jon. I'll make sure this is fixed in #281 if it is not already.
#281 has rewritten this functionality with the new fs-mv command, which also resolves this issue.
this still happens as of 28 october 2025. fresh install of mac os 26
bash -ic "$(curl -fsSL https://dorothy.bevry.me/install)"
/Users/bazo/.zshrc -> /Users/bazo/.config/zsh/.zshrc
Installing Dorothy into /Users/bazo/.local/share/dorothy from https://github.com/bevry/dorothy
git clone --quiet --no-tags https://github.com/bevry/dorothy.git /Users/bazo/.local/share/dorothy
git checkout --quiet HEAD
ln: /Users/bazo/.local/share/dorothy: Directory not empty
Yes, the resolve to this will be merged later this week. Everything is fixed. It just has to be merged into master now.
@bazo there's still a few days more of touchups to do for #281 before merging, however you can give it a go via the instructions here: https://github.com/bevry/dorothy/issues/185#issuecomment-3446118658
Otherwise, wait a few days for me to ping back once it's merged.
Closing as fixed within #281, which is now ready for merging, and will be merged shortly.