-
-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: ensure asdf-plugin-manager works in expected worktree #56
fix: ensure asdf-plugin-manager works in expected worktree #56
Conversation
@aabouzaid, Any idea, when this will be merged.? we are also facing this issue if we aren't using the latest commit ref for the plugins. Also I have tested this fix by downloading the script and it helps to resolve the issue. |
2aa6b3e
to
c79a3a3
Compare
c79a3a3
to
eb39134
Compare
eb39134
to
7092ab6
Compare
I've fixed the issue, which will be included in the next release. |
plugin_name="${1}" | ||
plugin_ref="${2}" | ||
git --git-dir "${PLUGINS_REPOS_DIR}/${plugin_name}/.git" checkout "${plugin_ref}" -q | ||
git_dir="${PLUGINS_REPOS_DIR}/${plugin_name}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
btw removing local
now means you're reassigning a global variable, which these are not. just fyi.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's only a problem if another global var has the same name.
But in general, I will review all functions vars and make them local to avoid any issues in the future.
fixes #55
--git-dir
doesn't work as by itself, so also include--worktree