topgrade-rs / topgrade

Upgrade all the things
GNU General Public License v3.0
1.7k stars 113 forks source link

custom TPM path #832

Closed rubiin closed 3 days ago

rubiin commented 1 week ago

since tpm path is hardcoded, when using a custom tpm path with the env var, no update is occuring.

TMUX_PLUGIN_MANAGER_PATH=.config/tmux/plugins/tpm

Erroneous Behavior

Expected Behavior

It should consider the path specified in TMUX_PLUGIN_MANAGER_PATH for tpm

Steps to reproduce

change the tmux folder from .tmux to .config/tmux set env TMUX_PLUGIN_MANAGER_PATH=.config/tmux/plugins/tpm execute topgrade

Possible Cause (Optional)

https://github.com/topgrade-rs/topgrade/blob/8b9d7ef8f37dbe8ef618000b974423d831c0dd7d/src/steps/tmux.rs#L21 check if TMUX_PLUGIN_MANAGER_PATH is set here

Problem persists without calling from topgrade

Did you run topgrade through Remote Execution

If yes, does the issue still occur when you run topgrade directlly in your remote host

Configuration file (Optional)

Additional Details

Verbose Output (topgrade -v)

DEBUG Configuration at /home/rubin/.config/topgrade.toml
DEBUG Path ~/.config/nvim expanded to /home/rubin/.config/nvim
DEBUG Path ~/.tmux expanded to /home/rubin/.tmux
DEBUG Loaded configuration: ConfigFile { include: Some(Include { paths: None }), misc: Some(Misc { pre_sudo: Some(true), sudo_command: None, disable: Some([Vim, Node, Yarn, Pnpm]), ignore_failures: None, remote_topgrades: None, remote_topgrade_path: None, ssh_arguments: None, tmux_arguments: None, set_title: None, display_time: Some(true), assume_yes: Some(true), no_retry: None, run_in_tmux: None, cleanup: Some(true), notify_each_step: None, skip_notify: None, bashit_branch: None, only: None, no_self_update: None, log_filters: None }), pre_commands: Some({}), post_commands: Some({}), commands: Some({"Mise": "mise self-update;mise plugins update", "Npm Global": "taze -gwi"}), python: Some(Python { enable_pip_review: None, enable_pip_review_local: None, enable_pipupgrade: None, pipupgrade_arguments: None }), composer: Some(Composer { self_update: None }), brew: Some(Brew { greedy_cask: None, autoremove: None }), linux: Some(Linux { yay_arguments: None, aura_aur_arguments: None, aura_pacman_arguments: None, arch_package_manager: None, show_arch_news: None, garuda_update_arguments: None, trizen_arguments: None, pikaur_arguments: None, pamac_arguments: None, dnf_arguments: None, nix_arguments: None, nix_env_arguments: None, apt_arguments: None, enable_tlmgr: None, redhat_distro_sync: None, suse_dup: None, rpm_ostree: None, emerge_sync_flags: None, emerge_update_flags: None, home_manager_arguments: None }), git: Some(Git { max_concurrency: None, arguments: None, repos: Some(["/home/rubin/.config/nvim", "/home/rubin/.tmux"]), pull_predefined: None }), containers: None, windows: None, npm: None, yarn: None, vim: None, firmware: Some(Firmware { upgrade: None }), vagrant: None, flatpak: Some(Flatpak { use_sudo: None }), distrobox: None }
DEBUG Version: 14.0.1
DEBUG OS: x86_64-unknown-linux-gnu
DEBUG Args { inner: ["topgrade", "-v"] }
DEBUG Binary path: Ok("/usr/bin/topgrade")
DEBUG self-update Feature Enabled: false
DEBUG Configuration: Config { opt: CommandLineArgs { edit_config: false, show_config_reference: false, run_in_tmux: false, cleanup: false, dry_run: false, no_retry: false, disable: [], only: [], custom_commands: [], env: [], verbose: true, keep_at_end: false, skip_notify: false, yes: None, disable_predefined_git_repos: false, config: None, remote_host_limit: None, show_skipped: false, log_filter: "warn", gen_completion: None, gen_manpage: false, no_self_update: false }, config_file: ConfigFile { include: Some(Include { paths: None }), misc: Some(Misc { pre_sudo: Some(true), sudo_command: None, disable: Some([Vim, Node, Yarn, Pnpm]), ignore_failures: None, remote_topgrades: None, remote_topgrade_path: None, ssh_arguments: None, tmux_arguments: None, set_title: None, display_time: Some(true), assume_yes: Some(true), no_retry: None, run_in_tmux: None, cleanup: Some(true), notify_each_step: None, skip_notify: None, bashit_branch: None, only: None, no_self_update: None, log_filters: None }), pre_commands: Some({}), post_commands: Some({}), commands: Some({"Mise": "mise self-update;mise plugins update", "Npm Global": "taze -gwi"}), python: Some(Python { enable_pip_review: None, enable_pip_review_local: None, enable_pipupgrade: None, pipupgrade_arguments: None }), composer: Some(Composer { self_update: None }), brew: Some(Brew { greedy_cask: None, autoremove: None }), linux: Some(Linux { yay_arguments: None, aura_aur_arguments: None, aura_pacman_arguments: None, arch_package_manager: None, show_arch_news: None, garuda_update_arguments: None, trizen_arguments: None, pikaur_arguments: None, pamac_arguments: None, dnf_arguments: None, nix_arguments: None, nix_env_arguments: None, apt_arguments: None, enable_tlmgr: None, redhat_distro_sync: None, suse_dup: None, rpm_ostree: None, emerge_sync_flags: None, emerge_update_flags: None, home_manager_arguments: None }), git: Some(Git { max_concurrency: None, arguments: None, repos: Some(["/home/rubin/.config/nvim", "/home/rubin/.tmux"]), pull_predefined: None }), containers: None, windows: None, npm: None, yarn: None, vim: None, firmware: Some(Firmware { upgrade: None }), vagrant: None, flatpak: Some(Flatpak { use_sudo: None }), distrobox: None }, allowed_steps: [AM, AppMan, Asdf, Atom, Audit, Bin, Bob, BrewCask, BrewFormula, Bun, BunPackages, Cargo, Chezmoi, Chocolatey, Choosenim, Composer, Conda, ConfigUpdate, Containers, CustomCommands, DebGet, Deno, Distrobox, DkpPacman, Dotnet, Emacs, Firmware, Flatpak, Flutter, Fossil, Gcloud, Gem, Ghcup, GithubCliExtensions, GitRepos, GnomeShellExtensions, Go, Guix, Haxelib, Helm, HomeManager, Jetpack, Julia, Juliaup, Kakoune, Helix, Krew, Lure, Macports, Mamba, Miktex, Mas, Maza, Micro, Myrepos, Nix, Opam, Pacdef, Pacstall, Pearl, Pip3, PipReview, PipReviewLocal, Pipupgrade, Pipx, Pkg, Pkgin, Powershell, Protonup, Raco, Rcm, Remotes, Restarts, Rtcl, RubyGems, Rustup, Scoop, Sdkman, SelfUpdate, Sheldon, Shell, Snap, Sparkle, Spicetify, Stack, Stew, System, Tldr, Tlmgr, Tmux, Toolbx, Vagrant, Vcpkg, Vscode, Winget, Wsl, WslUpdate, Yadm] }
SteveLauC commented 1 week ago

Good catch!

It seems that TPM will create a plugins directory under $TMUX_PLUGIN_MANAGER_PATH, it your case, it will be .config/tmux/plugins/tpm/plugins?

Then topgrade should involve the command like this:

$ .config/tmux/plugins/tpm/plugins/tpm/bin/update_plugins all

Ref: https://github.com/tmux-plugins/tpm/blob/master/docs/changing_plugins_install_dir.md

rubiin commented 1 week ago

yeah . Heres the plugins folder image