Browse Source

bug: fix cli describe plugin crash issue

RockyJin 4 years atrás
parent
commit
06d32c050b
1 changed files with 4 additions and 0 deletions
  1. 4 0
      xstream/cli/main.go

+ 4 - 0
xstream/cli/main.go

@@ -316,6 +316,10 @@ func main() {
 							fmt.Printf("%s\n", err)
 							return nil
 						}
+						if len(c.Args()) != 2 {
+							fmt.Printf("Expect plugin name.\n")
+							return nil
+						}
 						pname := c.Args()[1]
 						args := &common.PluginDesc{
 							RuleDesc: common.RuleDesc{