aboutsummaryrefslogtreecommitdiff
path: root/src/cli.c
diff options
context:
space:
mode:
authordacctal <donotcontactmevia@email.invalid>2026-08-09 07:30:59 +0000
committerdacctal <donotcontactmevia@email.invalid>2026-08-09 07:30:59 +0000
commit4fa342bcfdb5ebcbe65cabe1fb9ac3a46ea4ddca (patch)
treee7398fc7b26e9bd225f2c10ed0557baa771fca78 /src/cli.c
parente2cda84ebbd073ece54692c6a3d785afc6148268 (diff)
checkpoint (it doesn't compile)
Diffstat (limited to 'src/cli.c')
-rw-r--r--src/cli.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/src/cli.c b/src/cli.c
index c4499ff..24bace0 100644
--- a/src/cli.c
+++ b/src/cli.c
@@ -25,6 +25,7 @@
#include "common.h"
#include "help.h"
#include "log.h"
+#include "lua_state.h"
#include "state.h"
#include "str.h"
@@ -236,11 +237,17 @@ cli_result_t cli(int argc, char **argv) {
print_help();
return CLI_HELP_CALLED;
}
- if (!parse_flags(argc, argv))
- return CLI_FAIL;
- if (!parse_cmds(argc, argv))
+ init_lua_config();
+ init_lua_state();
+
+ if (!parse_flags(argc, argv)) {
+ free_lua_config();
return CLI_FAIL;
+ } else if (!parse_cmds(argc, argv)) {
+ free_lua_config();
+ return CLI_FAIL;
+ }
return CLI_SUCCESS;
}