chore: Version 0.3 #136

Open
aniva wants to merge 487 commits from dev into main
1 changed files with 10 additions and 5 deletions
Showing only changes of commit 5e776a1b49 - Show all commits

View File

@ -33,11 +33,16 @@ partial def loop : MainM Unit := do
-- Using `Lean.Json.compress` here to prevent newline
IO.println error.compress
| .ok command =>
try
let ret ← execute command
let str := match state.options.printJsonPretty with
| true => ret.pretty
| false => ret.compress
IO.println str
catch e =>
let message ← e.toMessageData.toString
let error := Lean.toJson ({ error := "io", desc := message }: InteractionError)
IO.println error.compress
loop