From b94c38bb9988e9a4eb1679e5074e143409d2bf14 Mon Sep 17 00:00:00 2001 From: Starbeamrainbowlabs Date: Wed, 25 May 2022 02:07:16 +0100 Subject: [PATCH 1/2] tests.sh: add logging to test github actions --- tests.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests.sh b/tests.sh index bf902e5..63b7e9d 100755 --- a/tests.sh +++ b/tests.sh @@ -32,6 +32,9 @@ luarocks_root="${PWD}/.luarocks"; # Setup the lua module path # eval "$(luarocks --tree "${luarocks_root}" path)"; +echo "PATH | ${PATH}"; +echo "LUA_PATH | ${LUA_PATH}"; +echo "LUA_CPATH | ${LUA_CPATH}"; PATH="$(luarocks --tree "${luarocks_root}" path --lr-bin):${PATH}"; LUA_PATH="$(luarocks --tree "${luarocks_root}" path --lr-path);init.lua;./?.lua;${LUA_PATH}"; From 5ac98cfa225cda2cb77268bbc821013bc861cf20 Mon Sep 17 00:00:00 2001 From: Starbeamrainbowlabs Date: Wed, 25 May 2022 02:14:17 +0100 Subject: [PATCH 2/2] tests.sh: use $OSTYPE to decide how to call luarocks this is ridiculous --- tests.sh | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/tests.sh b/tests.sh index 63b7e9d..a999f7a 100755 --- a/tests.sh +++ b/tests.sh @@ -31,15 +31,13 @@ check_command luarocks; luarocks_root="${PWD}/.luarocks"; # Setup the lua module path -# eval "$(luarocks --tree "${luarocks_root}" path)"; -echo "PATH | ${PATH}"; -echo "LUA_PATH | ${LUA_PATH}"; -echo "LUA_CPATH | ${LUA_CPATH}"; - -PATH="$(luarocks --tree "${luarocks_root}" path --lr-bin):${PATH}"; -LUA_PATH="$(luarocks --tree "${luarocks_root}" path --lr-path);init.lua;./?.lua;${LUA_PATH}"; -LUA_CPATH="$(luarocks --tree "${luarocks_root}" path --lr-cpath);./?.so;${LUA_CPATH}"; - +if [[ "${OSTYPE}" == *"msys"* ]]; then + PATH="$(luarocks --tree "${luarocks_root}" path --lr-bin):${PATH}"; + LUA_PATH="$(luarocks --tree "${luarocks_root}" path --lr-path);init.lua;./?.lua;${LUA_PATH}"; + LUA_CPATH="$(luarocks --tree "${luarocks_root}" path --lr-cpath);./?.so;${LUA_CPATH}"; +else + eval "$(luarocks --tree "${luarocks_root}" path)"; +fi export PATH LUA_PATH LUA_CPATH;