From 2b36ee373794ae4d4df4de95ed9e1428b9157dc9 Mon Sep 17 00:00:00 2001 From: Nilesh Patra Date: Mon, 10 Jul 2023 01:31:18 +0530 Subject: [PATCH] fix xdg-update-dir and enable prettypanic by default --- debug/debug.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/debug/debug.go b/debug/debug.go index e62b078..f350124 100644 --- a/debug/debug.go +++ b/debug/debug.go @@ -32,7 +32,7 @@ import ( ) var writer io.Writer -var RecoverPrettyPanic bool +var RecoverPrettyPanic bool = true var DeadlockDetection bool var WriteLogs bool var OnRecover func() @@ -44,7 +44,7 @@ func GetUserDebugDir() string { } // See https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html if xdgStateHome := os.Getenv("XDG_STATE_HOME"); xdgStateHome != "" { - return xdgStateHome + return filepath.Join(xdgStateHome, "gomuks") } home := os.Getenv("HOME") if home == "" { @@ -67,7 +67,7 @@ func getUname() string { func Initialize() { err := os.MkdirAll(LogDirectory, 0750) if err != nil { - RecoverPrettyPanic = true + RecoverPrettyPanic = false DeadlockDetection = false WriteLogs = false return