Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 13 additions & 2 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -801,11 +801,22 @@ EOF

# Alias for familiarity. Symlinks are banned -- write a real wrapper script
# that execs the canonical launcher by its full path instead of a symlink.
cat > "$HOME/.local/bin/claude-cowork" << 'WRAP'
#
# Pre-8ad9bd7 installs left ~/.local/bin/claude-cowork as a symlink to
# claude-desktop. A plain `cat > claude-cowork` would FOLLOW that symlink
# and overwrite the just-written claude-desktop launcher with this wrapper,
# which then exec's itself in an infinite loop (PR #138). Write to a temp
# file in the same dir and `mv` it into place: mv replaces the symlink
# itself rather than its target, atomically, with no unconditional rm.
local cowork_alias="$HOME/.local/bin/claude-cowork"
local cowork_tmp
cowork_tmp="$(mktemp "$HOME/.local/bin/.claude-cowork.XXXXXX")" || die "Failed to create temp file for claude-cowork wrapper"
cat > "$cowork_tmp" << 'WRAP'
#!/bin/bash
exec "$HOME/.local/bin/claude-desktop" "$@"
WRAP
Comment on lines +813 to 817
chmod +x "$HOME/.local/bin/claude-cowork"
chmod +x "$cowork_tmp"
mv -f "$cowork_tmp" "$cowork_alias"

log_success "Created launchers: ~/.local/bin/claude-desktop, ~/.local/bin/claude-cowork"
}
Expand Down