From 11a3e62f17433a7df0e6a77a688321d94a736778 Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Thu, 2 Apr 2026 17:52:13 +0300 Subject: task 003: handle home-dir and APKG marshal errors --- internal/cli/command.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'internal/cli/command.go') diff --git a/internal/cli/command.go b/internal/cli/command.go index 2c7ee04..09c1758 100644 --- a/internal/cli/command.go +++ b/internal/cli/command.go @@ -12,6 +12,7 @@ import ( "codeberg.org/snonux/totalrecall/internal" "codeberg.org/snonux/totalrecall/internal/audio" + appconfig "codeberg.org/snonux/totalrecall/internal/config" ) // CreateRootCommand creates and configures the root cobra command @@ -49,7 +50,10 @@ Batch file formats: func setupFlags(cmd *cobra.Command, flags *Flags) { // Set default output directory to match GUI mode - home, _ := os.UserHomeDir() + home, err := appconfig.HomeDir() + if err != nil { + fmt.Fprintf(os.Stderr, "Warning: %v\n", err) + } defaultOutputDir := filepath.Join(home, ".local", "state", "totalrecall", "cards") // Global flags -- cgit v1.2.3