System processing is inconsistent for similar errors
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 466
- Forks
- 338
- Avg merge
- 3d 7h
- Merged PRs (30d)
- 8
Description
Bug Report
Please answer these questions before submitting your issue. Thanks!
- What did you do?
no param should be added after 'tiup dm -v' or 'tiup dm -h ',
but if adding a param behind these two commands, the system processing is not consistent.
for 'tiup dm -v 5' , tiup will ignore param '5', 'tiup dm -v' command will execute successfully
but for 'tiup dm -h 5', will return an error message
- What did you expect to see?
both two commands return an error
-
What did you see instead?
[root@localhost ~]# tiup dm -v 5
Starting componentdm: /root/.tiup/components/dm/v1.1.1/tiup-dm -v 5
tiup version v1.1.1 tiup
Go Version: go1.13
Git Branch: release-1.1
GitHash: 786b6c9
[root@localhost ~]#
[root@localhost ~]# tiup dm -h 5
Error: unknown command "5" for "tiup"
Verbose debug logs has been written to /root/logs/tiup-cluster-debug-2020-09-11-07-50-38.log.
Cannot fetch help message from /root/.tiup/components/dm/v1.1.1/tiup-dm failed: exit status 1
[root@localhost ~]# -
What version of TiUP are you using (
tiup --version)?
[root@localhost ~]# tiup dm -v
Starting component dm: /root/.tiup/components/dm/v1.1.2/tiup-dm -v
tiup version v1.1.2 tiup
Go Version: go1.13
Git Branch: release-1.1
GitHash: 7cb85b9-dirty
[root@localhost ~]#
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the two reported entry points, tiup dm -v 5 and tiup dm -h 5, and trace how the tiup dm CLI forwards arguments. Compare the validation paths for -v and -h; done means both commands reject an extra positional argument with an error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100