From 981deeee778af28f5378a2b72c73fa6e44405130 Mon Sep 17 00:00:00 2001 From: HAYAMA Kaoru <3752189+hymkor@users.noreply.github.com> Date: Sun, 17 Aug 2025 16:45:58 +0900 Subject: [PATCH] lispect.exe now uses `gmnlisp/exit` packages and enables to use `(quit N)` with no stacktraces --- cmd/lispect/main.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/cmd/lispect/main.go b/cmd/lispect/main.go index 2e30890..d5bd9d4 100644 --- a/cmd/lispect/main.go +++ b/cmd/lispect/main.go @@ -1,10 +1,12 @@ package main import ( + "errors" "fmt" "os" "runtime" + "github.com/hymkor/gmnlisp/exit" "github.com/hymkor/lispect" ) @@ -22,6 +24,10 @@ func mains(args []string) error { } func main() { if err := mains(os.Args[1:]); err != nil { + var exitError exit.ExitError + if errors.As(err, &exitError) { + os.Exit(exitError.Value) + } fmt.Fprintln(os.Stderr, err.Error()) os.Exit(1) }