Skip to content

Commit fdc3cf6

Browse files
refactor(dir): set default directory to .notation
Signed-off-by: Jason <[email protected]>
1 parent 46c35d4 commit fdc3cf6

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

dir/path.go

+2
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,8 @@ func userConfigDirPath() string {
8686
if err != nil {
8787
// fallback to current directory
8888
userDir = "."
89+
UserConfigDir = "." + notation
90+
return UserConfigDir
8991
}
9092
// set user config
9193
UserConfigDir = filepath.Join(userDir, notation)

dir/path_test.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,8 @@ func Test_NoHomeVariable(t *testing.T) {
4242
setup()
4343
userConfigDir = os.UserConfigDir
4444
got := userConfigDirPath()
45-
if got != "notation" {
46-
t.Fatalf(`UserConfigDirPath() = %q, want "notation"`, UserConfigDir)
45+
if got != ".notation" {
46+
t.Fatalf(`UserConfigDirPath() = %q, want ".notation"`, UserConfigDir)
4747
}
4848
}
4949

0 commit comments

Comments
 (0)