Skip to content

Commit

Permalink
move the blank PATH detector to uniquePath func
Browse files Browse the repository at this point in the history
  • Loading branch information
bmeng committed Sep 17, 2020
1 parent 10695c1 commit 8c0e185
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions cmd/ocm/plugin/list/cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,10 +66,6 @@ func run(cmd *cobra.Command, argv []string) error {
continue
}

if dir == "" {
dir = "."
}

items, err := ioutil.ReadDir(dir)
if err != nil {
return err
Expand Down Expand Up @@ -110,6 +106,9 @@ func uniquePath(path []string) []string {
uniPath := make([]string, 0)

for _, p := range path {
if p == "" {
p = "."
}
keys[p] = 1
}

Expand Down

0 comments on commit 8c0e185

Please sign in to comment.