Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
sunny0826 committed Mar 16, 2021
1 parent c722b71 commit 062392b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions cmd/plugin/cli/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,11 @@ $ kubectl pod-lens prometheus-prometheus-operator-prometheus-0
_ = viper.BindPFlags(cmd.Flags())
},
RunE: func(cmd *cobra.Command, args []string) error {
if len(args) < 1 {
return errors.New("A pod name is required!")
var podName string
if len(args) > 1 {
podName = args[0]
}

podName := args[0]
argsChannel := make(chan string, 1)
argsChannel <- podName

Expand Down

0 comments on commit 062392b

Please sign in to comment.