Compare commits

..

3 Commits

Author SHA1 Message Date
sammyette 4e3d2f8f86
Merge eded38c7b5 into a0513c0a05 2023-12-12 01:35:14 -07:00
sammyette a0513c0a05
chore: merge 2023-12-06 22:21:11 -04:00
sammyette 1d64a57e24
fix: return if runner did not return table 2023-12-06 22:20:41 -04:00
1 changed files with 3 additions and 0 deletions

View File

@ -175,6 +175,9 @@ func runLuaRunner(runr rt.Value, userInput string) (input string, exitCode uint8
runnerRet := term.Get(0) runnerRet := term.Get(0)
if runner, ok = runnerRet.TryTable(); !ok { if runner, ok = runnerRet.TryTable(); !ok {
fmt.Fprintln(os.Stderr, "runner did not return a table") fmt.Fprintln(os.Stderr, "runner did not return a table")
exitCode = 125
input = userInput
return
} }
if code, ok := runner.Get(rt.StringValue("exitCode")).TryInt(); ok { if code, ok := runner.Get(rt.StringValue("exitCode")).TryInt(); ok {