Skip to content

Bug: Bash updater breaks/fails with symlinked ~/.copilot_here.sh #39

@GordonBeeming

Description

@GordonBeeming

Summary

On macOS (at least), if ~/.copilot_here.sh is symlinked into a dotfiles repo (common setup), accepting the startup update prompt (or running --update) appears to succeed but the script content/version does not update. New terminal sessions then source the old script and continue to show the old version.

Environment

  • OS: macOS
  • Shell: zsh (or bash)
  • Install style: ~/.copilot_here.sh symlinked to a dotfiles-managed file (e.g., ~/.copilot_here.sh -> ~/dotfiles/.copilot_here.sh)
  • Update channel: cli-latest

Steps to reproduce

  1. Create a symlink: ln -s ~/dotfiles/.copilot_here.sh ~/.copilot_here.sh
  2. Start a new terminal that sources ~/.copilot_here.sh
  3. Run copilot_here or yolo and accept the update prompt
  4. Open a new terminal window

Expected behavior

  • The update process updates the target file that ~/.copilot_here.sh points to (symlink is preserved).
  • After update, new terminal sessions load the updated file and show the new version.

Actual behavior

  • After update, the contents of the symlink target do not change (version remains old), so new terminals load the old content.
  • In some cases the update may silently fail to persist the new script (leaving the old file unchanged).

Acceptance criteria

  • With ~/.copilot_here.sh as a symlink, copilot_here --update updates the symlink target and does not break the symlink.
  • With ~/.copilot_here.sh as a symlink, accepting the startup auto-update updates the target and a new terminal shows the new version.
  • Non-symlink installs continue to work.
  • Failure to persist the script produces a clear warning and does not claim success.

Notes

PowerShell update uses a content-write approach (Set-Content) already, so this bug is specific to the bash/zsh updater implementation.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions