Phault / proto-toml-plugins

A collection of plugins for proto.
MIT License
2 stars 1 forks source link

Gum plugin failure #10

Closed W1M0R closed 2 weeks ago

W1M0R commented 1 month ago

The gum plugin fails when trying to install the following versions of gum:

  1. 0.14.1
  2. 0.14.0
> proto use
Error: proto::execute::missing_file

  × Unable to find an executable for Gum, expected file ~\.proto\tools\gum\0.14.1\gum.exe does not exist. 
❯ ls -Recurse C:\Users\user2\.proto\tools\gum\0.14.1

    Directory: C:\Users\user2\.proto\tools\gum\0.14.1

Mode                 LastWriteTime         Length Name
----                 -------------         ------ ----
d----          2024/07/16    13:59                gum_0.14.1_Windows_x86_64

    Directory: C:\Users\user2\.proto\tools\gum\0.14.1\gum_0.14.1_Windows_x86_64

Mode                 LastWriteTime         Length Name
----                 -------------         ------ ----
d----          2024/07/16    13:59                completions
d----          2024/07/16    13:59                manpages
-a---          2024/07/16    14:10       27823616 gum.exe
-a---          2024/07/16    14:10           1080 LICENSE
-a---          2024/07/16    14:10          12718 README.md

    Directory: C:\Users\user2\.proto\tools\gum\0.14.1\gum_0.14.1_Windows_x86_64\completions

Mode                 LastWriteTime         Length Name
----                 -------------         ------ ----
-a---          2024/07/16    14:10          26012 gum.bash
-a---          2024/07/16    14:10          18998 gum.fish
-a---          2024/07/16    14:10          14978 gum.zsh

    Directory: C:\Users\user2\.proto\tools\gum\0.14.1\gum_0.14.1_Windows_x86_64\manpages

Mode                 LastWriteTime         Length Name
----                 -------------         ------ ----
-a---          2024/07/16    14:10           5099 gum.1.gz
W1M0R commented 1 month ago

The following version of the plugin seems to work, even for gum v0.13.0:

name = "gum"
type = "cli"

[resolve]
git-url = "https://github.com/charmbracelet/gum"

[platform.linux]
archive-prefix = "gum_{version}_Linux_{arch}"
download-file = "gum_{version}_Linux_{arch}.tar.gz"
checksum-file = "checksums.txt"

[platform.macos]
archive-prefix = "gum_{version}_Darwin_{arch}"
download-file = "gum_{version}_Darwin_{arch}.tar.gz"
checksum-file = "checksums.txt"

[platform.windows]
archive-prefix = "gum_{version}_Windows_{arch}"
download-file = "gum_{version}_Windows_{arch}.zip"
checksum-file = "checksums.txt"

[install]
download-url = "https://github.com/charmbracelet/gum/releases/download/v{version}/{download_file}"
checksum-url = "https://github.com/charmbracelet/gum/releases/download/v{version}/{checksum_file}"

[install.arch]
x86 = "i386"
arm = "armv6"
aarch64 = "arm64"
Phault commented 2 weeks ago

Thanks, I've merged your fix.