summaryrefslogtreecommitdiff
path: root/cmd
diff options
context:
space:
mode:
Diffstat (limited to 'cmd')
-rw-r--r--cmd/tasksamurai/main.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/cmd/tasksamurai/main.go b/cmd/tasksamurai/main.go
index b964f52..96c8be8 100644
--- a/cmd/tasksamurai/main.go
+++ b/cmd/tasksamurai/main.go
@@ -7,6 +7,7 @@ import (
"runtime"
+ "codeberg.org/snonux/tasksamurai/internal/debug"
"codeberg.org/snonux/tasksamurai/internal/task"
"codeberg.org/snonux/tasksamurai/internal/ui"
@@ -21,6 +22,7 @@ func main() {
}
debugLog := flag.String("debug-log", "", "path to debug log file")
+ debugDir := flag.String("debug-dir", "", "directory for runtime debug output (goroutine dumps, profiles)")
browserCmd := flag.String("browser-cmd", browserCmdDefault, "command used to open URLs")
disco := flag.Bool("disco", false, "enable disco mode")
flag.Parse()
@@ -30,6 +32,10 @@ func main() {
os.Exit(1)
}
+ // Set up runtime debugging signal handlers
+ debug.SetDebugDir(*debugDir)
+ debug.InitSignalHandlers()
+
m, err := ui.New(flag.Args(), *browserCmd)
if err != nil {
fmt.Fprintln(os.Stderr, "failed to load tasks:", err)