From b343a74c85db9eb566bf55c04705a8cbacf5c5e2 Mon Sep 17 00:00:00 2001 From: justiceenunciate <4430224+justiceenunciate@users.noreply.github.com> Date: Fri, 14 Aug 2026 20:25:02 -0700 Subject: [PATCH 1/3] feat!: set platform to "linux" when uname -r displays Linux --- bin/install | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/bin/install b/bin/install index 8906890..1005d01 100755 --- a/bin/install +++ b/bin/install @@ -134,12 +134,10 @@ get_target() { elif [ "${lua_type}" = "LuaJIT" ]; then # LuaJIT doesn't use targets like regular Lua echo "" - else # Otherwise let the lua Makefile guess for us - if less_than_version_5_4x "$version"; then - echo "linux" - else - echo "guess" - fi + elif [ "$os" = "Linux" ]; then + echo "linux" + else + echo "guess" fi } From 7bd6ae14540015126ed45066b3e5c18b14070841 Mon Sep 17 00:00:00 2001 From: justiceenunciate <4430224+justiceenunciate@users.noreply.github.com> Date: Fri, 14 Aug 2026 20:25:02 -0700 Subject: [PATCH 2/3] fix: only use linux-readline target for Lua 5.4.x --- bin/install | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/bin/install b/bin/install index 1005d01..8f78bad 100755 --- a/bin/install +++ b/bin/install @@ -129,7 +129,8 @@ get_target() { # If on OSX (Darwin) then the target is macosx if [ "$os" = "Darwin" ]; then echo "macosx" - elif [ "${ASDF_LUA_LINUX_READLINE-}" == "1" ]; then + # Readline is required for 5.1 - 5.3, optional for 5.4, and dynamically included for 5.5 + elif [ "${ASDF_LUA_LINUX_READLINE-}" == "1" ] && version_5_4_x "$version"; then echo "linux-readline" elif [ "${lua_type}" = "LuaJIT" ]; then # LuaJIT doesn't use targets like regular Lua @@ -174,11 +175,11 @@ version_5_2x_or_greater() { fi } -less_than_version_5_4x() { +version_5_4_x() { version=$1 IFS='.' read -ra version_array <<<"$version" major_minor_version="${version_array[0]}0${version_array[1]}" - if (("$major_minor_version" < 504)); then + if (("$major_minor_version" >= 504)) && (("$major_minor_version" < 505)); then return 0 else return 1 From 9dba7ac3097a5be61798dc6d8e791d99d9ea5107 Mon Sep 17 00:00:00 2001 From: justiceenunciate <4430224+justiceenunciate@users.noreply.github.com> Date: Fri, 14 Aug 2026 20:25:02 -0700 Subject: [PATCH 3/3] docs: update README to reflect ASDF_LUA_LINUX_READLINE change --- README.md | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index a11d571..97f47c4 100644 --- a/README.md +++ b/README.md @@ -31,7 +31,12 @@ You can also read my [Lua Version Management with asdf-lua](http://stratus3d.com ### Linux Readline -If you are installing Lua 5.4.x or greater on linux by default Lua will be compiled without readline. You can override this behavior by setting `ASDF_LUA_LINUX_READLINE=1` before running `asdf install`. See this thread for the details - http://lua-users.org/lists/lua-l/2020-07/msg00363.html +If you are installing Lua 5.4.x on Linux, Lua will be compiled without +readline. + +You can override this behavior by setting `ASDF_LUA_LINUX_READLINE=1` before running `asdf install`. + +(See this thread for the details - http://lua-users.org/lists/lua-l/2020-07/msg00363.html) ## Development