2
2
mirror of https://github.com/Hilbis/Hilbish synced 2025-04-22 05:23:23 +00:00

Compare commits

...

2 Commits

Author SHA1 Message Date
a0513c0a05
chore: merge 2023-12-06 22:21:11 -04:00
1d64a57e24
fix: return if runner did not return table 2023-12-06 22:20:41 -04:00

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 {