Skip to content

Commit

Permalink
Allow mise in place of asdf
Browse files Browse the repository at this point in the history
  • Loading branch information
sax committed Feb 15, 2024
1 parent 287299b commit 4a80aad
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 13 deletions.
2 changes: 1 addition & 1 deletion .medic/doctor.exs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[
{Medic.Checks.Asdf, :plugin_installed?, ["rust"]},
{Medic.Checks.ToolVersions, :plugin_installed?, ["rust"]},
{Medic.Checks.Hex, :local_hex_installed?},
{Medic.Checks.Hex, :local_rebar_installed?},
{Medic.Checks.Hex, :packages_installed?}
Expand Down
2 changes: 1 addition & 1 deletion .medic/require.exs
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
Mix.install([
{:medic, "~> 1.9", force: true}
{:medic, "~> 1.11", force: true}
])
32 changes: 21 additions & 11 deletions bin/dev/doctor
Original file line number Diff line number Diff line change
Expand Up @@ -15,21 +15,31 @@ fi

cecho --green "\n▸" --bright-bold-cyan "Running initial doctor checks..."

check "asdf: installed" \
"command -v asdf" \
check "tool-versions: installed" \
"command -v mise || command -v asdf" \
"open 'https://asdf-vm.com/#/core-manage-asdf'"

check "asdf: erlang plugin installed" \
"asdf plugin-list | grep erlang" \
"asdf plugin-add erlang"
if command -v mise; then
TOOLS="mise"
elif command -v asdf; then
TOOLS="asdf"
fi

check "tool-versions: erlang plugin installed" \
"${TOOLS} plugin-list | grep erlang" \
"${TOOLS} plugin add erlang"

check "tool-versions: elixir plugin installed" \
"${TOOLS} plugin-list | grep elixir" \
"${TOOLS} plugin add elixir"

check "asdf: elixir plugin installed" \
"asdf plugin-list | grep elixir" \
"asdf plugin-add elixir"
check "tool-versions: postgres plugin installed" \
"${TOOLS} plugin-list | grep postgres" \
"${TOOLS} plugin add postgres"

check "asdf: tools are installed" \
"asdf which erl > /dev/null && asdf which elixir > /dev/null" \
"asdf install"
check "tool-versions: tools are installed" \
"${TOOLS} which erl > /dev/null && ${TOOLS} which elixir > /dev/null" \
"${TOOLS} install"

echo ""

Expand Down

0 comments on commit 4a80aad

Please sign in to comment.