Open
Description
Bug Report
Please answer these questions before submitting your issue. Thanks!
- What did you do?
TiUP fails to pass multi-character ("long") options with a single-dash prefix to subcomponents.
-
What did you expect to see?
-
What did you see instead?
It seems that somehow whatever tiup is doing to proxy the options to the subcommand results in them being mishandled?
It seems that when the option has a single-dash prefix and contains an "h", it's interpreted as "-h" (help/usage output) when sent through tiup but not when the tool is invoked directly!
ubuntu@ip-10-0-1-86:~$ tiup --help tidb-lightning -backend tidb -tidb-host 127.0.0.1
use `tiup install --help` to install component `--help` first: component not installed
ubuntu@ip-10-0-1-86:~$ ~/.tiup/components/tidb-lightning/v5.0.1/tidb-lightning -tidb-host 127.0.0.1
Verbose debug logs will be written to /tmp/lightning.log.2021-05-19T22.47.34Z
tidb lightning encountered error: cannot fetch settings from TiDB, please manually fill in `tidb.port` and `tidb.pd-addr`: Get http://127.0.0.1:10080/settings: dial tcp 127.0.0.1:10080: connect: connection refused
ubuntu@ip-10-0-1-86:~$ tiup tidb-lightning -tidb-host 127.0.0.1
Usage:
-L value
log level: info, debug, warn, error, fatal (default info)
-V print version of lightning
-analyze value
analyze table after importing
-backend value
delivery backend: importer, tidb, local (default importer)
...
- What version of TiUP are you using (
tiup --version
)?
1.4.3 tiup
Go Version: go1.16.4
Git Ref: v1.4.3
GitHash: 0faec47a553138b68c4e1529a771746cc2e17011