fix: resolve symlinks in update.sh, tui.sh, restart.sh#360
Conversation
SCRIPT_DIR used dirname of $0 which resolves to the symlink's directory (e.g. ~/bin), not the repo. Now follows symlink chain with readlink before resolving dirname. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
Your free trial has ended. If you'd like to continue receiving code reviews, you can add a payment method here.
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (3)
📝 WalkthroughWalkthroughThree shell scripts (restart.sh, tui.sh, update.sh) have been modified to resolve symlinks when computing the script directory. Each script now follows symlink targets iteratively to locate the real script path before deriving SCRIPT_DIR, ensuring all subsequent commands use the actual script directory instead of a symlink directory. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
SCRIPT_DIR used
dirname $0which points to the symlink's directory (e.g. ~/bin), not the actual repo. Now follows the symlink chain withreadlinkbefore resolving dirname. Fixes aceclaw-update, aceclaw-tui, aceclaw-restart when invoked via symlink.Summary by CodeRabbit