From c9a917b83034bb657cb4cb0a73f4dd2124aac02a Mon Sep 17 00:00:00 2001 From: Jesse Duffield Date: Sun, 2 Jul 2023 14:21:26 +1000 Subject: [PATCH] Print entire panic message For some reason, the panic message was being truncated. So here we're printing it first, and then calling panic --- pkg/gui/gui_driver.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pkg/gui/gui_driver.go b/pkg/gui/gui_driver.go index a90578b65..824c9ed33 100644 --- a/pkg/gui/gui_driver.go +++ b/pkg/gui/gui_driver.go @@ -2,6 +2,7 @@ package gui import ( "fmt" + "os" "strings" "time" @@ -70,7 +71,8 @@ func (self *GuiDriver) Fail(message string) { self.gui.g.Close() // need to give the gui time to close time.Sleep(time.Millisecond * 100) - panic(fullMessage) + fmt.Fprintln(os.Stderr, fullMessage) + panic("Test failed") } // logs to the normal place that you log to i.e. viewable with `lazygit --logs`