From 5a10d81b4625d5aebdfc8bf965f82d3e15cc6d86 Mon Sep 17 00:00:00 2001 From: Yakiyo Date: Mon, 28 Aug 2023 15:59:59 +0000 Subject: [PATCH] feat: expand path --- where/where.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/where/where.go b/where/where.go index ae232cb..22d3379 100644 --- a/where/where.go +++ b/where/where.go @@ -52,5 +52,9 @@ func Config() string { // set root to a path func SetRoot(path string) { - root = path + f, err := homedir.Expand(path) + if err != nil { + log.Fatal("Unexpected error when expanding root path", "err", err) + } + root = f }