Skip to content
This repository has been archived by the owner on Apr 4, 2023. It is now read-only.

Commit

Permalink
Merge pull request #23 from compose/bugfix-list
Browse files Browse the repository at this point in the history
Fix list bug with types and filters
  • Loading branch information
codepope authored Jun 13, 2018
2 parents defb921 + 832378f commit 462125f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cmd/list.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ var listCmd = &cobra.Command{
deployments, errs := c.GetDeployments()
bailOnErrs(errs)

matcher, err := regexp.Compile(filter)
matcher, err := regexp.Compile(listfilter)
if err != nil {
log.Fatal(err)
}
Expand All @@ -51,7 +51,7 @@ var listCmd = &cobra.Command{
fmt.Printf("%-24s %-14s %-40s\n", strings.Repeat("-", 24), strings.Repeat("-", 14), strings.Repeat("-", 40))

for _, v := range *deployments {
if (dbtype == "" || dbtype == v.Type) && matcher.MatchString(v.Name) {
if (listdbtype == "" || listdbtype == v.Type) && matcher.MatchString(v.Name) {
fmt.Printf("%-24s %-14s %-40s\n", v.ID, v.Type, v.Name)
}
}
Expand Down

0 comments on commit 462125f

Please sign in to comment.