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

feat: allow specifying asdf plugins with full urls #3067

Merged
merged 3 commits into from
Nov 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions docs/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,6 @@ erlang = ['23.3', '24.0']
# supports everything you can do with .tool-versions currently
node = ['16', 'prefix:20', 'ref:master', 'path:~/.nodes/14']

[plugins]
# specify a custom repo url
# note this will only be used if the plugin does not already exist
python = 'https://github.com/asdf-community/asdf-python'

[alias.node.versions] # project-local aliases
# use vfox:version-fox/vfox-nodejs when running `mise i node@backend`
backend = "vfox:version-fox/vfox-nodejs"
Expand All @@ -52,6 +47,12 @@ my_custom_node = '20'

[tasks.build]
run = 'echo "running build tasks"'

[plugins]
# DEPRECATED: use `alias.<PLUGIN>` instead
# specify a custom repo url
# note this will only be used if the plugin does not already exist
python = 'https://github.com/asdf-community/asdf-python'
```

`mise.toml` files are hierarchical. The configuration in a file in the current directory will
Expand Down
13 changes: 13 additions & 0 deletions docs/dev-tools/aliases.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,18 @@
# Aliases

## Aliased Backends

Tools can be aliased so that something like `node` which normally maps to `core:node` can be changed
to something like `asdf:company/our-custom-node` instead.

```toml
[alias]
node = 'asdf:company/our-custom-node' # shorthand for https://github.com/company/our-custom-node
erlang = 'asdf:https://github.com/company/our-custom-erlang'
```

## Aliased Versions

mise supports aliasing the versions of runtimes. One use-case for this is to define aliases for LTS
versions of runtimes. For example, you may want to specify `lts-hydrogen` as the version for <node@20.x>
so you can use set it with `node lts-hydrogen` in `.tool-versions`/`mise.toml`.
Expand Down
18 changes: 9 additions & 9 deletions docs/registry.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ editLink: false
| btrace | [asdf:joschi/asdf-btrace](https://github.com/joschi/asdf-btrace) |
| buf | [ubi:bufbuild/buf](https://github.com/bufbuild/buf) [asdf:truepay/asdf-buf](https://github.com/truepay/asdf-buf) |
| buildpack | [asdf:johnlayton/asdf-buildpack](https://github.com/johnlayton/asdf-buildpack) |
| bun | [core:bun](https://mise.jdx.dev/lang/bun.html) [vfox:ahai-code/vfox-bun](https://github.com/ahai-code/vfox-bun) |
| bun | [core:bun](https://mise.jdx.dev/lang/bun.html) |
| bundler | [asdf:jonathanmorley/asdf-bundler](https://github.com/jonathanmorley/asdf-bundler) |
| cabal | [asdf:sestrella/asdf-ghcup](https://github.com/sestrella/asdf-ghcup) |
| caddy | [aqua:caddyserver/caddy](https://github.com/caddyserver/caddy) [asdf:salasrod/asdf-caddy](https://github.com/salasrod/asdf-caddy) |
Expand Down Expand Up @@ -168,7 +168,7 @@ editLink: false
| dbmate | [aqua:amacneil/dbmate](https://github.com/amacneil/dbmate) [asdf:juusujanar/asdf-dbmate](https://github.com/juusujanar/asdf-dbmate) |
| deck | [aqua:Kong/deck](https://github.com/Kong/deck) [asdf:nutellinoit/asdf-deck](https://github.com/nutellinoit/asdf-deck) |
| delta | [ubi:dandavison/delta](https://github.com/dandavison/delta) [asdf:andweeb/asdf-delta](https://github.com/andweeb/asdf-delta) |
| deno | [core:deno](https://mise.jdx.dev/lang/deno.html) [vfox:version-fox/vfox-deno](https://github.com/version-fox/vfox-deno) |
| deno | [core:deno](https://mise.jdx.dev/lang/deno.html) |
| dep | [asdf:paxosglobal/asdf-dep](https://github.com/paxosglobal/asdf-dep) |
| depot | [asdf:depot/asdf-depot](https://github.com/depot/asdf-depot) |
| desk | [aqua:jamesob/desk](https://github.com/jamesob/desk) [asdf:endorama/asdf-desk](https://github.com/endorama/asdf-desk) |
Expand Down Expand Up @@ -217,7 +217,7 @@ editLink: false
| envcli | [asdf:zekker6/asdf-envcli](https://github.com/zekker6/asdf-envcli) |
| envsubst | [aqua:a8m/envsubst](https://github.com/a8m/envsubst) [asdf:dex4er/asdf-envsubst](https://github.com/dex4er/asdf-envsubst) |
| ephemeral-postgres | [asdf:smashedtoatoms/asdf-ephemeral-postgres](https://github.com/smashedtoatoms/asdf-ephemeral-postgres) |
| erlang | [core:erlang](https://mise.jdx.dev/lang/erlang.html) [asdf:asdf-vm/asdf-erlang](https://github.com/asdf-vm/asdf-erlang) [vfox:version-fox/vfox-erlang](https://github.com/version-fox/vfox-erlang) |
| erlang | [core:erlang](https://mise.jdx.dev/lang/erlang.html) |
| esc | [asdf:fxsalazar/asdf-esc](https://github.com/fxsalazar/asdf-esc) |
| esy | [asdf:asdf-community/asdf-esy](https://github.com/asdf-community/asdf-esy) |
| etcd | [asdf:particledecay/asdf-etcd](https://github.com/particledecay/asdf-etcd) [vfox:version-fox/vfox-etcd](https://github.com/version-fox/vfox-etcd) |
Expand Down Expand Up @@ -269,7 +269,7 @@ editLink: false
| glen | [asdf:bradym/asdf-glen](https://github.com/bradym/asdf-glen) |
| glooctl | [asdf:halilkaya/asdf-glooctl](https://github.com/halilkaya/asdf-glooctl) |
| glow | [aqua:charmbracelet/glow](https://github.com/charmbracelet/glow) [asdf:mise-plugins/asdf-glow](https://github.com/mise-plugins/asdf-glow) |
| go | [core:go](https://mise.jdx.dev/lang/go.html) [vfox:version-fox/vfox-golang](https://github.com/version-fox/vfox-golang) |
| go | [core:go](https://mise.jdx.dev/lang/go.html) |
| go-containerregistry | [aqua:google/go-containerregistry](https://github.com/google/go-containerregistry) [asdf:dex4er/asdf-go-containerregistry](https://github.com/dex4er/asdf-go-containerregistry) |
| go-getter | [asdf:ryodocx/asdf-go-getter](https://github.com/ryodocx/asdf-go-getter) |
| go-jira | [asdf:dguihal/asdf-go-jira](https://github.com/dguihal/asdf-go-jira) |
Expand Down Expand Up @@ -346,7 +346,7 @@ editLink: false
| io | [asdf:mracos/asdf-io](https://github.com/mracos/asdf-io) |
| istioctl | [aqua:istio/istio/istioctl](https://github.com/istio/istio/istioctl) [asdf:virtualstaticvoid/asdf-istioctl](https://github.com/virtualstaticvoid/asdf-istioctl) |
| janet | [asdf:Jakski/asdf-janet](https://github.com/Jakski/asdf-janet) |
| java | [core:java](https://mise.jdx.dev/lang/java.html) [vfox:version-fox/vfox-java](https://github.com/version-fox/vfox-java) |
| java | [core:java](https://mise.jdx.dev/lang/java.html) |
| jb | [asdf:beardix/asdf-jb](https://github.com/beardix/asdf-jb) |
| jbang | [asdf:jbangdev/jbang-asdf](https://github.com/jbangdev/jbang-asdf) |
| jfrog-cli | [asdf:LozanoMatheus/asdf-jfrog-cli](https://github.com/LozanoMatheus/asdf-jfrog-cli) |
Expand Down Expand Up @@ -509,7 +509,7 @@ editLink: false
| nfpm | [ubi:goreleaser/nfpm](https://github.com/goreleaser/nfpm) [asdf:ORCID/asdf-nfpm](https://github.com/ORCID/asdf-nfpm) |
| nim | [asdf:asdf-community/asdf-nim](https://github.com/asdf-community/asdf-nim) |
| ninja | [aqua:ninja-build/ninja](https://github.com/ninja-build/ninja) [asdf:asdf-community/asdf-ninja](https://github.com/asdf-community/asdf-ninja) |
| node | [core:node](https://mise.jdx.dev/lang/node.html) [vfox:version-fox/vfox-nodejs](https://github.com/version-fox/vfox-nodejs) |
| node | [core:node](https://mise.jdx.dev/lang/node.html) |
| nomad | [aqua:hashicorp/levant](https://github.com/hashicorp/levant) [asdf:asdf-community/asdf-hashicorp](https://github.com/asdf-community/asdf-hashicorp) |
| nomad-pack | [asdf:asdf-community/asdf-hashicorp](https://github.com/asdf-community/asdf-hashicorp) |
| notation | [aqua:notaryproject/notation](https://github.com/notaryproject/notation) [asdf:bodgit/asdf-notation](https://github.com/bodgit/asdf-notation) |
Expand Down Expand Up @@ -584,7 +584,7 @@ editLink: false
| purerl | [asdf:GoNZooo/asdf-purerl](https://github.com/GoNZooo/asdf-purerl) |
| purescript | [asdf:jrrom/asdf-purescript](https://github.com/jrrom/asdf-purescript) |
| purty | [asdf:nsaunders/asdf-purty](https://github.com/nsaunders/asdf-purty) |
| python | [core:python](https://mise.jdx.dev/lang/python.html) [vfox:version-fox/vfox-python](https://github.com/version-fox/vfox-python) |
| python | [core:python](https://mise.jdx.dev/lang/python.html) |
| qdns | [asdf:moritz-makandra/asdf-plugin-qdns](https://github.com/moritz-makandra/asdf-plugin-qdns) |
| quarkus | [asdf:asdf-community/asdf-quarkus](https://github.com/asdf-community/asdf-quarkus) |
| r | [asdf:asdf-community/asdf-r](https://github.com/asdf-community/asdf-r) |
Expand Down Expand Up @@ -615,7 +615,7 @@ editLink: false
| rlwrap | [asdf:asdf-community/asdf-rlwrap](https://github.com/asdf-community/asdf-rlwrap) |
| rome | [asdf:kichiemon/asdf-rome](https://github.com/kichiemon/asdf-rome) |
| rstash | [asdf:carlduevel/asdf-rstash](https://github.com/carlduevel/asdf-rstash) |
| ruby | [core:ruby](https://mise.jdx.dev/lang/ruby.html) [vfox:yanecc/vfox-ruby](https://github.com/yanecc/vfox-ruby) |
| ruby | [core:ruby](https://mise.jdx.dev/lang/ruby.html) |
| ruff | [ubi:astral-sh/ruff](https://github.com/astral-sh/ruff) [asdf:simhem/asdf-ruff](https://github.com/simhem/asdf-ruff) |
| rust | [asdf:code-lever/asdf-rust](https://github.com/code-lever/asdf-rust) |
| rust-analyzer | [aqua:rust-lang/rust-analyzer](https://github.com/rust-lang/rust-analyzer) [asdf:Xyven1/asdf-rust-analyzer](https://github.com/Xyven1/asdf-rust-analyzer) |
Expand Down Expand Up @@ -814,7 +814,7 @@ editLink: false
| zbctl | [asdf:camunda-community-hub/asdf-zbctl](https://github.com/camunda-community-hub/asdf-zbctl) |
| zellij | [ubi:zellij-org/zellij](https://github.com/zellij-org/zellij) [asdf:chessmango/asdf-zellij](https://github.com/chessmango/asdf-zellij) |
| zephyr | [asdf:nsaunders/asdf-zephyr](https://github.com/nsaunders/asdf-zephyr) |
| zig | [core:zig](https://mise.jdx.dev/lang/zig.html) [asdf:cheetah/asdf-zig](https://github.com/cheetah/asdf-zig) [vfox:version-fox/vfox-zig](https://github.com/version-fox/vfox-zig) |
| zig | [core:zig](https://mise.jdx.dev/lang/zig.html) |
| zigmod | [asdf:mise-plugins/asdf-zigmod](https://github.com/mise-plugins/asdf-zigmod) |
| zola | [ubi:getzola/zola](https://github.com/getzola/zola) [asdf:salasrod/asdf-zola](https://github.com/salasrod/asdf-zola) |
| zoxide | [ubi:ajeetdsouza/zoxide](https://github.com/ajeetdsouza/zoxide) [asdf:nyrst/asdf-zoxide](https://github.com/nyrst/asdf-zoxide) |
Expand Down
4 changes: 0 additions & 4 deletions e2e-win/python.Tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,4 @@ Describe 'node' {
mise x python@3.12.0 -- where python
mise x python@3.12.0 -- python --version | Should -Be "Python 3.12.0"
}
It 'executes vfox:python 3.13.0' {
mise x vfox:python@3.13.0 -- where python
mise x vfox:python@3.13.0 -- python --version | Should -Be "Python 3.13.0"
}
}
4 changes: 4 additions & 0 deletions e2e/backend/test_asdf
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/usr/bin/env bash

assert "mise x asdf:jdx/mise-tiny -- mise-tiny" "mise-tiny: v3.1.0"
assert "mise x asdf:https://github.com/jdx/mise-tiny -- mise-tiny" "mise-tiny: v3.1.0"
15 changes: 11 additions & 4 deletions e2e/config/test_config_alias
Original file line number Diff line number Diff line change
@@ -1,18 +1,25 @@
#!/usr/bin/env bash

cat <<EOF >mise.toml
tools.node = "100.0.0"
tools.erlang = "1.0.0-erlang"
tools.node = "1.0.0-node"
tools.python = "1.0.0-python"
tools.mytool = "2"
tools.mytool-lts = "lts"

alias.node = "asdf:tiny"
alias.mytool = "asdf:tiny"
[alias]
erlang = 'asdf:https://github.com/jdx/mise-tiny'
node = "asdf:tiny"
python = 'asdf:jdx/mise-tiny'
mytool = "asdf:tiny"
[alias.mytool-lts]
backend = "asdf:tiny"
versions = {lts = "1.0.1"}
EOF

assert_contains "mise x node -- rtx-tiny" "rtx-tiny: v100.0.0"
assert_contains "mise x erlang -- mise-tiny" "mise-tiny: v1.0.0-erlang"
assert_contains "mise x node -- rtx-tiny" "rtx-tiny: v1.0.0-node"
assert_contains "mise x python -- mise-tiny" "mise-tiny: v1.0.0-python"
assert_contains "mise x mytool -- rtx-tiny" "rtx-tiny: v2.1.0"
assert_contains "mise x mytool-lts -- rtx-tiny" "rtx-tiny: v1.0.1"

Expand Down
10 changes: 10 additions & 0 deletions e2e/config/test_config_plugins
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/usr/bin/env bash

cat >mise.toml <<EOF
[tools]
erlang = '1'
[plugins]
erlang = 'https://github.com/jdx/mise-tiny'
EOF

assert "mise x erlang -- mise-tiny" "mise-tiny: v1.1.0"
4 changes: 2 additions & 2 deletions e2e/tasks/test_task_deps
Original file line number Diff line number Diff line change
Expand Up @@ -34,5 +34,5 @@ run = "echo Hello from 2"
description = "Hello from all"
depends = ["hello:*"]
EOF
assert "mise run hello:all" "[hello:1] Hello from 1
[hello:2] Hello from 2"
assert_contains "mise run hello:all" "[hello:1] Hello from 1"
assert_contains "mise run hello:all" "[hello:2] Hello from 2"
18 changes: 9 additions & 9 deletions registry.toml
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ brig.backends = ["asdf:Ibotta/asdf-brig"]
btrace.backends = ["asdf:joschi/asdf-btrace"]
buf.backends = ["ubi:bufbuild/buf", "asdf:truepay/asdf-buf"]
buildpack.backends = ["asdf:johnlayton/asdf-buildpack"]
bun.backends = ["core:bun", "vfox:ahai-code/vfox-bun"]
bun.backends = ["core:bun"]
bun.test = ["bun --version", "{{version}}"]
bundler.backends = ["asdf:jonathanmorley/asdf-bundler"]
cabal.backends = ["asdf:sestrella/asdf-ghcup"]
Expand Down Expand Up @@ -183,7 +183,7 @@ daytona.backends = ["asdf:CrouchingMuppet/asdf-daytona"]
dbmate.backends = ["aqua:amacneil/dbmate", "asdf:juusujanar/asdf-dbmate"]
deck.backends = ["aqua:Kong/deck", "asdf:nutellinoit/asdf-deck"]
delta.backends = ["ubi:dandavison/delta", "asdf:andweeb/asdf-delta"]
deno.backends = ["core:deno", "vfox:version-fox/vfox-deno"]
deno.backends = ["core:deno"]
dep.backends = ["asdf:paxosglobal/asdf-dep"]
depot.backends = ["asdf:depot/asdf-depot"]
desk.backends = ["aqua:jamesob/desk", "asdf:endorama/asdf-desk"]
Expand Down Expand Up @@ -236,7 +236,7 @@ emsdk.backends = ["asdf:RobLoach/asdf-emsdk"]
envcli.backends = ["asdf:zekker6/asdf-envcli"]
envsubst.backends = ["aqua:a8m/envsubst", "asdf:dex4er/asdf-envsubst"]
ephemeral-postgres.backends = ["asdf:smashedtoatoms/asdf-ephemeral-postgres"]
erlang.backends = ["core:erlang", "asdf:asdf-vm/asdf-erlang", "vfox:version-fox/vfox-erlang"]
erlang.backends = ["core:erlang"]
esc.backends = ["asdf:fxsalazar/asdf-esc"]
esy.backends = ["asdf:asdf-community/asdf-esy"]
etcd.backends = ["asdf:particledecay/asdf-etcd", "vfox:version-fox/vfox-etcd"]
Expand Down Expand Up @@ -294,7 +294,7 @@ gleam.backends = ["aqua:gleam-lang/gleam", "asdf:asdf-community/asdf-gleam"]
glen.backends = ["asdf:bradym/asdf-glen"]
glooctl.backends = ["asdf:halilkaya/asdf-glooctl"]
glow.backends = ["aqua:charmbracelet/glow", "asdf:mise-plugins/asdf-glow"]
go.backends = ["core:go", "vfox:version-fox/vfox-golang"]
go.backends = ["core:go"]
go-containerregistry.backends = ["aqua:google/go-containerregistry", "asdf:dex4er/asdf-go-containerregistry"]
go-getter.backends = ["asdf:ryodocx/asdf-go-getter"]
go-jira.backends = ["asdf:dguihal/asdf-go-jira"]
Expand Down Expand Up @@ -380,7 +380,7 @@ io.backends = ["asdf:mracos/asdf-io"]
istioctl.backends = ["aqua:istio/istio/istioctl", "asdf:virtualstaticvoid/asdf-istioctl"]
istioctl.test = ["istioctl version", "client version: {{version}}"]
janet.backends = ["asdf:Jakski/asdf-janet"]
java.backends = ["core:java", "vfox:version-fox/vfox-java"]
java.backends = ["core:java"]
jb.backends = ["asdf:beardix/asdf-jb"]
jbang.backends = ["asdf:jbangdev/jbang-asdf"]
jfrog-cli.backends = ["asdf:LozanoMatheus/asdf-jfrog-cli"]
Expand Down Expand Up @@ -553,7 +553,7 @@ newrelic-cli.backends = ["ubi:newrelic/newrelic-cli[exe=newrelic]", "asdf:NeoHsu
nfpm.backends = ["ubi:goreleaser/nfpm", "asdf:ORCID/asdf-nfpm"]
nim.backends = ["asdf:asdf-community/asdf-nim"]
ninja.backends = ["aqua:ninja-build/ninja", "asdf:asdf-community/asdf-ninja"]
node.backends = ["core:node", "vfox:version-fox/vfox-nodejs"]
node.backends = ["core:node"]
nomad.backends = ["aqua:hashicorp/levant", "asdf:asdf-community/asdf-hashicorp"]
nomad-pack.backends = ["asdf:asdf-community/asdf-hashicorp"]
notation.backends = ["aqua:notaryproject/notation", "asdf:bodgit/asdf-notation"]
Expand Down Expand Up @@ -630,7 +630,7 @@ pulumi.backends = ["aqua:pulumi/pulumi", "asdf:canha/asdf-pulumi"]
purerl.backends = ["asdf:GoNZooo/asdf-purerl"]
purescript.backends = ["asdf:jrrom/asdf-purescript"]
purty.backends = ["asdf:nsaunders/asdf-purty"]
python.backends = ["core:python", "vfox:version-fox/vfox-python"]
python.backends = ["core:python"]
qdns.backends = ["asdf:moritz-makandra/asdf-plugin-qdns"]
quarkus.backends = ["asdf:asdf-community/asdf-quarkus"]
r.backends = ["asdf:asdf-community/asdf-r"]
Expand Down Expand Up @@ -664,7 +664,7 @@ rke.backends = ["aqua:rancher/rke", "asdf:particledecay/asdf-rke"]
rlwrap.backends = ["asdf:asdf-community/asdf-rlwrap"]
rome.backends = ["asdf:kichiemon/asdf-rome"]
rstash.backends = ["asdf:carlduevel/asdf-rstash"]
ruby.backends = ["core:ruby", "vfox:yanecc/vfox-ruby"]
ruby.backends = ["core:ruby"]
ruff.backends = ["ubi:astral-sh/ruff", "asdf:simhem/asdf-ruff"]
rust.backends = ["asdf:code-lever/asdf-rust"]
rust-analyzer.backends = ["aqua:rust-lang/rust-analyzer", "asdf:Xyven1/asdf-rust-analyzer"]
Expand Down Expand Up @@ -868,7 +868,7 @@ ytt.backends = ["aqua:carvel-dev/ytt", "asdf:vmware-tanzu/asdf-carvel"]
zbctl.backends = ["asdf:camunda-community-hub/asdf-zbctl"]
zellij.backends = ["ubi:zellij-org/zellij", "asdf:chessmango/asdf-zellij"]
zephyr.backends = ["asdf:nsaunders/asdf-zephyr"]
zig.backends = ["core:zig", "asdf:cheetah/asdf-zig", "vfox:version-fox/vfox-zig"]
zig.backends = ["core:zig"]
zigmod.backends = ["asdf:mise-plugins/asdf-zigmod"]
zola.backends = ["ubi:getzola/zola", "asdf:salasrod/asdf-zola"]
zoxide.backends = ["ubi:ajeetdsouza/zoxide", "asdf:nyrst/asdf-zoxide"]
Expand Down
21 changes: 8 additions & 13 deletions src/backend/asdf.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,6 @@ use std::fs;
use std::hash::{Hash, Hasher};
use std::path::{Path, PathBuf};

use color_eyre::eyre::{eyre, Result, WrapErr};
use console::style;

use crate::backend::backend_type::BackendType;
use crate::backend::external_plugin_cache::ExternalPluginCache;
use crate::backend::Backend;
Expand All @@ -22,7 +19,10 @@ use crate::plugins::Script::{Download, ExecEnv, Install, ParseLegacyFile};
use crate::plugins::{Plugin, PluginType, Script, ScriptManager};
use crate::toolset::{ToolRequest, ToolVersion, Toolset};
use crate::ui::progress_report::SingleReport;
use crate::{env, file};
use crate::{dirs, env, file};
use color_eyre::eyre::{eyre, Result, WrapErr};
use console::style;
use heck::ToKebabCase;

/// This represents a plugin installed to ~/.local/share/mise/plugins
pub struct AsdfBackend {
Expand All @@ -42,7 +42,8 @@ pub struct AsdfBackend {
impl AsdfBackend {
pub fn from_arg(ba: BackendArg) -> Self {
let name = ba.tool_name.clone();
let plugin_path = ba.plugin_path.clone();
let plugin_path = dirs::PLUGINS.join(ba.short.to_kebab_case());
let plugin = AsdfPlugin::new(name.clone(), plugin_path.clone());
let mut toml_path = plugin_path.join("mise.plugin.toml");
if plugin_path.join("rtx.plugin.toml").exists() {
toml_path = plugin_path.join("rtx.plugin.toml");
Expand Down Expand Up @@ -75,13 +76,7 @@ impl AsdfBackend {
.with_fresh_file(plugin_path.join("bin/list-legacy-filenames"))
.build(),
plugin_path,
plugin: Box::new(AsdfPlugin::new(
ba.plugin_path
.file_name()
.unwrap()
.to_string_lossy()
.to_string(),
)),
plugin: Box::new(plugin),
repo_url: None,
toml,
name,
Expand Down Expand Up @@ -258,7 +253,7 @@ impl Backend for AsdfBackend {
.get_or_try_init(|| self.plugin.fetch_remote_versions())
.wrap_err_with(|| {
eyre!(
"Failed listing remote versions for plugin {}",
"Failed listing remote versions for asdf tool {}",
style(&self.name).blue().for_stderr(),
)
})
Expand Down
1 change: 1 addition & 0 deletions src/backend/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ pub fn load_tools() {
})
.unwrap_or_default()
.into_values()
.filter(|ist| ist.full.is_some())
.flat_map(|ist| arg_to_backend(ist.into())),
);
time!("load_tools install_state");
Expand Down
2 changes: 1 addition & 1 deletion src/backend/vfox.rs
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ impl VfoxBackend {
pub fn from_arg(ba: BackendArg) -> Self {
let pathname = ba.short.to_kebab_case();
let plugin_path = dirs::PLUGINS.join(&pathname);
let mut plugin = VfoxPlugin::new(pathname.clone());
let mut plugin = VfoxPlugin::new(pathname.clone(), plugin_path.clone());
plugin.full = Some(ba.full());
Self {
remote_version_cache: CacheManagerBuilder::new(
Expand Down
Loading
Loading