aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar BanceDev 2024-09-12 09:58:38 -0400
committerGravatar BanceDev 2024-09-12 09:58:38 -0400
commitd41d846741cef5d7c7989d022594569043b8ef20 (patch)
tree3ee8ccfe28d8da4b21d1367377ee79a113e0cd47
parentprevent lush workflow from getting stuck in tests (diff)
attempt to update build script to accept input into lush shell
-rw-r--r--.github/workflows/build.yml8
-rw-r--r--src/lush.c2
2 files changed, 6 insertions, 4 deletions
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index e4fe904..dcae065 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -53,9 +53,11 @@ jobs:
- name: Run Lua tests
run: |
- lush
- ./test/run_tests.lua
- exit
+ /usr/bin/lush <<EOF
+ cd test
+ run_tests.lua
+ exit
+ EOF
- name: Upload the compiled binary (Optional)
uses: actions/upload-artifact@v3
diff --git a/src/lush.c b/src/lush.c
index f04d8d7..bc03726 100644
--- a/src/lush.c
+++ b/src/lush.c
@@ -1134,7 +1134,7 @@ int lush_run(lua_State *L, char ***commands, int num_commands) {
}
// check if the command is a lua script
- char *ext = strchr(commands[0][0], '.');
+ char *ext = strrchr(commands[0][0], '.');
if (ext) {
ext++;
if (strcmp(ext, "lua") == 0) {