Skip to content

Comments

Improve: Add symlink for consistent ferrumpy-current.data path duri…#3

Open
zavakid wants to merge 1 commit intoxiaoniaoyouhuajiang:mainfrom
zavakid:main
Open

Improve: Add symlink for consistent ferrumpy-current.data path duri…#3
zavakid wants to merge 1 commit intoxiaoniaoyouhuajiang:mainfrom
zavakid:main

Conversation

@zavakid
Copy link

@zavakid zavakid commented Jan 23, 2026

When I install a new version, my .zshrc always fails to update to the latest version, so I hope to update the version path to a fixed path, which would make it easier when installing a new version.

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 70f01bf53c

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

WORKER_PATH=""
DATA_DIR="$INSTALL_DIR/ferrumpy-${VERSION}.data/scripts"
if [ -d "$DATA_DIR" ] && [ -f "$DATA_DIR/ferrumpy-repl-worker" ]; then
ln -s -r "$INSTALL_DIR/ferrumpy-${VERSION}.data" "$INSTALL_DIR/ferrumpy-current.data"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Make symlink creation idempotent

Because the script uses set -e, this ln -s -r will abort the installer if ferrumpy-current.data already exists (e.g., re-running the installer after a previous version), which is exactly the update scenario described in the commit message. This makes upgrades fail instead of updating the symlink. Consider removing the existing link first or using ln -sf (and handling the case where a real directory already exists) so repeated installs succeed.

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant