tmux-plugins / tpm

Tmux Plugin Manager
MIT License
11.9k stars 417 forks source link

FIX Proposal on random "plugin download fail" #229

Open D3vil0p3r opened 1 year ago

D3vil0p3r commented 1 year ago

Hello, I noted sometimes that for some reason, when the tpm folder is already in .tmux/plugins/tpm, when I run .tmux/plugins/tpm/scripts/install_plugins.sh I could get the following error:

Installing "tpm"
tmux-plugins/tpm
  "tpm" download fail
Already installed "tmux-sensible"
Already installed "tmux-power"
Already installed "tmux-window-name"
Already installed "tmux-mouse-swipe"
Already installed "tmux-notify"
Already installed "tmux-prefix-highlight"
Already installed "tmux-net-speed"
Already installed "tmux-yank"

In this way the Tmux Plugin Manager is not installer. By studying the install_script.sh and changing the output messages of it, I could trigger the origin of the issue, that was:

Installing "tpm"
fatal: repository 'tmux-plugins/tpm' does not exist
fatal: destination path 'tpm' already exists and is not an empty directory.
  "tpm" download fail
Already installed "tmux-sensible"
Already installed "tmux-power"
Already installed "tmux-window-name"
Already installed "tmux-mouse-swipe"
Already installed "tmux-notify"
Already installed "tmux-prefix-highlight"
Already installed "tmux-net-speed"
Already installed "tmux-yank"

So, the message fatal: destination path 'tpm' already exists and is not an empty directory. is not consistent with tpm download fail original message. Indeed, by changing the .tmux/plugins/tpm as .tmux/plugins/tpmBAK and running again the install_script.sh inside it, the installation was successful:

Installing "tpm"
fatal: repository 'tmux-plugins/tpm' does not exist
Cloning into 'tpm'...
remote: Enumerating objects: 978, done.
remote: Counting objects: 100% (162/162), done.
remote: Compressing objects: 100% (47/47), done.
remote: Total 978 (delta 131), reused 126 (delta 115), pack-reused 816
Receiving objects: 100% (978/978), 205.55 KiB | 4.78 MiB/s, done.
Resolving deltas: 100% (625/625), done.
Submodule 'lib/tmux-test' (https://github.com/tmux-plugins/tmux-test.git) registered for path 'lib/tmux-test'
Cloning into '/home/athena/.tmux/plugins/tpm/lib/tmux-test'...
remote: Enumerating objects: 288, done.
remote: Counting objects: 100% (3/3), done.
remote: Compressing objects: 100% (3/3), done.
remote: Total 288 (delta 0), reused 3 (delta 0), pack-reused 285
Receiving objects: 100% (288/288), 59.96 KiB | 1.71 MiB/s, done.
Resolving deltas: 100% (172/172), done.
Submodule path 'lib/tmux-test': checked out '33fa65fbfb72ba6dd106c21bf5ee6cc353ecdbb6'
  "tpm" download success
Already installed "tmux-sensible"
Already installed "tmux-power"
Already installed "tmux-window-name"
Already installed "tmux-mouse-swipe"
Already installed "tmux-notify"
Already installed "tmux-prefix-highlight"
Already installed "tmux-net-speed"
Already installed "tmux-yank"

In conclusion, could you please fix the managing of error messages since the message fatal: destination path 'tpm' already exists and is not an empty directory. is not consistent with tpm download fail original message?

Thank you