summaryrefslogtreecommitdiff
path: root/internal/cli/command.go
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2026-04-02 17:52:13 +0300
committerPaul Buetow <paul@buetow.org>2026-04-02 17:52:13 +0300
commit11a3e62f17433a7df0e6a77a688321d94a736778 (patch)
treeada0f94c074a3e290ea993179fbf645a40d7ab48 /internal/cli/command.go
parentf3d057fec20aeef584cb6340c6a002280a019f15 (diff)
task 003: handle home-dir and APKG marshal errors
Diffstat (limited to 'internal/cli/command.go')
-rw-r--r--internal/cli/command.go6
1 files changed, 5 insertions, 1 deletions
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