From cb75776164fe2ac00219dbee134c3e5db6fb0742 Mon Sep 17 00:00:00 2001 From: Starbeamrainbowlabs Date: Wed, 25 May 2022 00:45:37 +0100 Subject: [PATCH] tests.sh: fix eval luarocks path on Windows Annoyingly luarocks generates batch commands on Windows, even when being called from Git Bash :-/ --- tests.sh | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/tests.sh b/tests.sh index 002c8ee..4672d13 100755 --- a/tests.sh +++ b/tests.sh @@ -31,7 +31,15 @@ check_command luarocks; luarocks_root="${PWD}/.luarocks"; # Setup the lua module path -eval "$(luarocks --tree "${luarocks_root}" path)"; +# eval "$(luarocks --tree "${luarocks_root}" path)"; + +PATH="$(luarocks --tree "${luarocks_root}" path --lr-bin):${PATH}"; +echo "PATH | ${PATH}"; +LUA_PATH="$(luarocks --tree "${luarocks_root}" path --lr-path);init.lua;./?.lua"; +LUA_CPATH="$(luarocks --tree "${luarocks_root}" path --lr-cpath);./?.so"; + + +export PATH LUA_PATH LUA_CPATH; mode="${1}"; if [[ "$#" -gt 0 ]]; then shift; fi