Skip to content
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: consider TMUX_PLUGIN_MANAGER_PATH when searching tpm binary #835

Merged
merged 2 commits into from
Jun 30, 2024

Conversation

SteveLauC
Copy link
Member

What does this PR do

Before this PR, when updating tmux plugins, we only look for the update binary in its default location. The actual location can be altered via environment variable TMUX_PLUGIN_MANAGER_PATH so it should be considered as well.

fixes #832

Standards checklist

  • The PR title is descriptive.
  • I have read CONTRIBUTING.md
  • Optional: I have tested the code myself

@SteveLauC
Copy link
Member Author

https://github.com/SteveLauC/topgrade/releases/tag/pr835

There is a build for linux with this patch included, @rubiin, welcome to give it a test.

@rubiin
Copy link

rubiin commented Jun 27, 2024

I will give it a try asap

@rubiin
Copy link

rubiin commented Jun 28, 2024

Tried but doesnt do anything

@rubiin
Copy link

rubiin commented Jun 28, 2024

image

@SteveLauC
Copy link
Member Author

SteveLauC commented Jun 30, 2024

Hi, would you like to show me where Topgrade should look for the update binary if TMUX_PLUGIN_MANAGER_PATH is set? Let's assume it is set to /tmp:

$ export TMUX_PLUGIN_MANAGER_PATH=/tmp

Then where is the update binary?

@rubiin
Copy link

rubiin commented Jun 30, 2024

image
seems to be located in this dir

@SteveLauC
Copy link
Member Author

You have TMUX_PLUGIN_MANAGER_PATH set to

~/.config/tmux/plugins/tpm,

and the update_plugins binary is at

~/.config/tmux/plugins/tpm/bin/install_plugins/tpm/bin

so Topgrade should look for $TMUX_PLUGIN_MANAGER_PATH/bin/install_plugins/tpm/bin/update_plugins if the variable is set, right?

@rubiin
Copy link

rubiin commented Jun 30, 2024

https://github.com/tmux-plugins/tpm/blob/master/docs/automatic_tpm_installation.md
from the docs , TMUX_PLUGIN_MANAGER_PATH should point to the .config/tmux/plugins/tpm

that is to say the root tpm folder

so Topgrade should look for $TMUX_PLUGIN_MANAGER_PATH/bin/install_plugins/tpm/bin/update_plugins
which is correct

@SteveLauC
Copy link
Member Author

https://github.com/SteveLauC/topgrade/releases/tag/pr835

There is a build for linux with this patch included, @rubiin, welcome to give it a test.

Attached Topgrade build updated, welcome to give it another test.

@rubiin
Copy link

rubiin commented Jun 30, 2024

sure will get back to you

@rubiin
Copy link

rubiin commented Jun 30, 2024

image

Working fine now, before that tmux step would have been escaped :) LGTM

@SteveLauC SteveLauC merged commit f2dfa1e into topgrade-rs:main Jun 30, 2024
11 checks passed
@SteveLauC SteveLauC deleted the fix/tmux_path branch June 30, 2024 11:17
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.

custom TPM path
2 participants