From 9ea0ec6b5c9293893f2d54d0478fee4cebe6646f Mon Sep 17 00:00:00 2001 From: Jason Date: Tue, 3 Sep 2024 13:26:37 +1000 Subject: [PATCH] refactor(dir): set default directory to .notation Signed-off-by: Jason --- dir/path.go | 2 ++ dir/path_test.go | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/dir/path.go b/dir/path.go index a667e97d..e6285fb9 100644 --- a/dir/path.go +++ b/dir/path.go @@ -86,6 +86,8 @@ func userConfigDirPath() string { if err != nil { // fallback to current directory userDir = "." + UserConfigDir = "." + notation + return UserConfigDir } // set user config UserConfigDir = filepath.Join(userDir, notation) diff --git a/dir/path_test.go b/dir/path_test.go index 06f4c6b0..ceeafc3f 100644 --- a/dir/path_test.go +++ b/dir/path_test.go @@ -42,8 +42,8 @@ func Test_NoHomeVariable(t *testing.T) { setup() userConfigDir = os.UserConfigDir got := userConfigDirPath() - if got != "notation" { - t.Fatalf(`UserConfigDirPath() = %q, want "notation"`, UserConfigDir) + if got != ".notation" { + t.Fatalf(`UserConfigDirPath() = %q, want ".notation"`, UserConfigDir) } }