From 100f7f3b48193f432bb18a6058b6414f78355939 Mon Sep 17 00:00:00 2001 From: lash Date: Sun, 16 Apr 2023 13:41:41 +0100 Subject: [PATCH] Rehabilitate generic interactive tool --- dev/interactive/main.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/dev/interactive/main.go b/dev/interactive/main.go index 607e4d0..0a0ae8c 100644 --- a/dev/interactive/main.go +++ b/dev/interactive/main.go @@ -23,7 +23,12 @@ func main() { ctx := context.Background() en := engine.NewSizedEngine(dir, uint32(size)) - err := engine.Loop(&en, os.Stdin, os.Stdout, ctx) + err := en.Init(ctx) + if err != nil { + fmt.Fprintf(os.Stderr, "engine init exited with error: %v\n", err) + os.Exit(1) + } + err = engine.Loop(&en, os.Stdin, os.Stdout, ctx) if err != nil { fmt.Fprintf(os.Stderr, "loop exited with error: %v\n", err) os.Exit(1)