Skip to content

Commit

Permalink
refactor(dir): set default directory to .notation
Browse files Browse the repository at this point in the history
Signed-off-by: Jason <[email protected]>
  • Loading branch information
JasonTheDeveloper committed Sep 3, 2024
1 parent 46c35d4 commit fdc3cf6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions dir/path.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
4 changes: 2 additions & 2 deletions dir/path_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
}

Expand Down

0 comments on commit fdc3cf6

Please sign in to comment.