WIP Add termination handler in engine

This commit is contained in:
lash
2023-04-06 10:08:40 +01:00
parent 6325ef4afd
commit a3073f6189
7 changed files with 47 additions and 28 deletions

View File

@@ -41,7 +41,7 @@ func main() {
os.Exit(1)
}
in = strings.TrimSpace(in)
err = en.Exec([]byte(in), ctx)
running, err = en.Exec([]byte(in), ctx)
if err != nil {
fmt.Fprintf(os.Stderr, "execution terminated: %v\n", err)
os.Exit(1)
@@ -50,4 +50,5 @@ func main() {
en.WriteResult(b)
fmt.Println(b.String())
}
}