From 0301da35b7c7c40fa28f7404c22ec12f03c94172 Mon Sep 17 00:00:00 2001 From: Goren G Date: Sun, 7 Apr 2024 15:30:43 +0800 Subject: [PATCH] fix: set default distribution to `open` (#6) --- hooks/available.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hooks/available.lua b/hooks/available.lua index b062a1f..b413a03 100644 --- a/hooks/available.lua +++ b/hooks/available.lua @@ -5,10 +5,10 @@ local shortname = require("shortname") --- @param ctx table Empty table used as context, for future extension --- @return table Descriptions of available versions and accompanying tool descriptions function PLUGIN:Available(ctx) - local distribution = ctx.args[1] + local distribution = ctx.args[1] or "open" local jdks = {} - if distribution and distribution == "all" then + if distribution == "all" then for short, dist in pairs(shortname) do local tempJdks = foojay.fetchtJdkList(dist, "") for _, jdk in ipairs(tempJdks) do