jdx / mise

dev tools, env vars, task runner
https://mise.jdx.dev
MIT License
9.98k stars 288 forks source link

Add plugin specific ENV? #1798

Open h3adache opened 7 months ago

h3adache commented 7 months ago

Is it possible to override ENV for just one specific plugin? I am facing an issue where an older version of teleport-ent was not built for darwin-amd64.

This results in an error when we try to just run mise install

mise install
curl: (22) The requested URL returned error: 404
mise ~/.local/share/mise/plugins/teleport-ent/bin/download failed
* Downloading teleport-ent release 11.3.11...
curl: (22) The requested URL returned error: 404
asdf-teleport-ent: Could not download https://cdn.teleport.dev/teleport-ent-v11.3.11-darwin-arm64-bin.tar.gz
mise ~/.local/share/mise/plugins/teleport-ent/bin/download exited with non-zero status: exit code 1
mise Run with --verbose or MISE_VERBOSE=1 for more information

The workaround is to run with ARCH

ARCH=amd64 mise install teleport-ent 11.3.11

But it could be nice for this and future scenarios if env could be targeted to plugins. e.g.

[env]
TELEPORT_ENT_ARCH=amd64
jdx commented 7 months ago

this is impossible. mise would need to wrap every command but that simply is not how it works

edit: sorry I misunderstood, I thought you were asking when something is executed. It would be possible to have something run only during plugin installation