Skip to content

Commit

Permalink
ctl: add tidb-lightning (#1863)
Browse files Browse the repository at this point in the history
  • Loading branch information
nexustar authored and AstroProfundis committed May 10, 2022
1 parent 05b56fd commit 6aff5f1
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions components/ctl/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ func execute() error {
return errors.New("component `ctl` cannot run in standalone mode")
}
rootCmd := &cobra.Command{
Use: "tiup ctl {tidb/pd/tikv/binlog/etcd/cdc}",
Use: "tiup ctl {tidb/pd/tikv/binlog/etcd/cdc/tidb-lightning}",
Short: "TiDB controllers",
SilenceUsage: true,
FParseErrWhitelist: cobra.FParseErrWhitelist{UnknownFlags: true},
Expand Down Expand Up @@ -89,14 +89,14 @@ func execute() error {

func binaryPath(home, cmd string) (string, error) {
switch cmd {
case "tidb", "tikv", "pd":
case "tidb", "tikv", "pd", "tidb-lightning":
return path.Join(home, cmd+"-ctl"), nil
case "binlog", "etcd":
return path.Join(home, cmd+"ctl"), nil
case "cdc":
return path.Join(home, cmd+" cli"), nil
default:
return "", errors.New("ctl only supports tidb, tikv, pd, binlog, etcd and cdc currently")
return "", errors.New("ctl only supports tidb, tikv, pd, binlog, tidb-lightning, etcd and cdc currently")
}
}

Expand Down

0 comments on commit 6aff5f1

Please sign in to comment.