Skip to content

Commit

Permalink
Merge ad7b0ec into 35e3cc3
Browse files Browse the repository at this point in the history
  • Loading branch information
feloy authored Nov 29, 2022
2 parents 35e3cc3 + ad7b0ec commit a2304ee
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions pkg/odo/cli/list/namespace/namespace.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import (
"fmt"
"io"
"os"
"strings"
"text/tabwriter"

"github.com/redhat-developer/odo/pkg/api"
Expand Down Expand Up @@ -98,11 +99,9 @@ func NewCmdNamespaceList(name, fullName string) *cobra.Command {
if len(os.Args) > 2 {
o.commandName = os.Args[2]
}

// trim commandName if user passed a plural form
lastElement := len(o.commandName) - 1
if o.commandName[lastElement] == byte('s') {
o.commandName = o.commandName[:lastElement]
}
o.commandName = strings.TrimSuffix(o.commandName, "s")
projectListCmd := &cobra.Command{
Use: name,
Short: listLongDesc,
Expand Down

0 comments on commit a2304ee

Please sign in to comment.