Skip to content

Commit

Permalink
fix: when configuration file is specified, skip finding configuration…
Browse files Browse the repository at this point in the history
… files
  • Loading branch information
suzuki-shunsuke committed Jan 3, 2023
1 parent 4a806d3 commit 54ab8c7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion pkg/config-finder/config_finder.go
Expand Up @@ -63,7 +63,7 @@ func (finder *ConfigFinder) Finds(wd, configFilePath string) []string {
if configFilePath == "" {
return findconfig.Finds(wd, finder.exist, configFileNames()...)
}
return append([]string{util.Abs(wd, configFilePath)}, findconfig.Finds(wd, finder.exist, configFileNames()...)...)
return []string{util.Abs(wd, configFilePath)}
}

func (finder *ConfigFinder) exist(p string) bool {
Expand Down
3 changes: 1 addition & 2 deletions pkg/config-finder/config_finder_test.go
Expand Up @@ -109,7 +109,7 @@ func Test_configFinderFind(t *testing.T) { //nolint:funlen
}
}

func Test_configFinderFinds(t *testing.T) { //nolint:funlen
func Test_configFinderFinds(t *testing.T) {
t.Parallel()
data := []struct {
name string
Expand Down Expand Up @@ -150,7 +150,6 @@ func Test_configFinderFinds(t *testing.T) { //nolint:funlen
},
exp: []string{
"/home/foo/aqua-2.yaml",
"/home/.aqua.yaml",
},
},
}
Expand Down

0 comments on commit 54ab8c7

Please sign in to comment.