-
-
Notifications
You must be signed in to change notification settings - Fork 29
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
Avoid automatic installation when already installed #109
Comments
Add more debugging output to track down why we're getting reports like #109 that the plugin is installing `fzf` when it's already installed. Signed-off-by: Joe Block <[email protected]>
I tried getting behind this as I had the same issue. What i found is that the doesn't work correctly. The following are my outputs (when inlining the ▶ which fzf
/etc/profiles/per-user/hendrik/bin/fzf
▶ [[ ! $(which "fzf" > /dev/null 2>&1) ]] && echo "fzf not installed"
fzf not installed
▶ [[ ! $(which "fzf_not_valid" > /dev/null 2>&1) ]] && echo "fzf not installed"
fzf not installed When instead I use the ▶ command -v fzf
/etc/profiles/per-user/hendrik/bin/fzf
▶ command -v fzf >/dev/null 2>&1 && echo "fzf installed"
fzf installed
▶ command -v fzf_not_valid >/dev/null 2>&1 && echo "fzf installed"
[ no output here ] I'm not a shell wizard so I can't tell if the "which" expression can be fixed without parsing its output. ▶ function _fzf_has() {
command -v "$@" > /dev/null 2>&1
}
▶ if ! _fzf_has fzf; then echo "installing fzf"; fi
[ no output here ]
▶ if ! _fzf_has fzf_not_valid; then echo "installing fzf"; fi
installing fzf I'm happy to provide a PR if you approve. Kind regards |
It seems this plugin always wants to install
fzf
to its own path, even though one might already have it installed through another package manager.Is there a way to disable installation of fzf, and having the plugin detect it in PATH?
The text was updated successfully, but these errors were encountered: