Skip to content

Rutime version manager (.tool-versions) checks for medic-rs

License

Notifications You must be signed in to change notification settings

synchronal/medic-ext-tool-versions

Repository files navigation

Medic Tool Versions

An extension pack for using medic with runtime managers that support .tool-versions files. It supports both asdf and mise, with a preference for mise (or its older version rtx) if found in the PATH.

Also see medic-ext-asdf if a specific runtime version manager is preferred.

Installation

brew tap synchronal/tap
brew install medic-ext-tool-versions

Example Brewfile:

tap 'synchronal/tap'

brew  'synchronal/tap/medic'
brew  'synchronal/tap/medic-ext-tool-versions'

Usage

[doctor]

checks = [
  { check = "tool-versions", command = "plugin-installed", args = { plugin = "rust" } },
  { check = "tool-versions", command = "package-installed", args = { plugin = "rust" } },
]

medic-check-tool-versions

Checks for whether plugins and specific plugin packages are installed via the runtime version manager.

All checks do an initial test to find mise, rtx, or asdf, in that order.

plugin installed?

Checks whether a plugin is installed.

medic-check-tool-versions plugin-installed --plugin rust

package installed?

Checks whether a package is installed for a specific plugin. If --version is not passed, the version configured with .tool-versions is used.

medic-check-tool-versions package-installed --plugin rust
medic-check-tool-versions package-installed --plugin rust --version nightly