-
Notifications
You must be signed in to change notification settings - Fork 899
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[cmd/flag]: validation is skipping empty flag value #3003
Comments
The empty network is actually provided. Doesn't look like a problem. |
this is a UX problem that when a user is providing emptiness, node needs to reject such behaviours and ask for a specific value instead of accepting emptiness. Emptiness is fine when there is no flag at all. The current bug displays a UX problem when a user expects the light node to join mocha testnet, but ended up in celestia mainnet |
On the first read, I misunderstood the issue due to reading the following as Actual Result, rather than Expected, and I thought you wanted to make it work with empty string.
In fact that's the opposite so the issue makes sense |
hmmm i believe because of this line. We can return an error here instead if we want to reject it |
I have pushed a fix at #3004. Ideally a shorthand network notation is good to have. |
Fixes #3003. <!-- Thank you for submitting a pull request! Please make sure you have reviewed our contributors guide before submitting your first PR. Please ensure you've addressed or included references to any related issues. Tips: - Use keywords like "closes" or "fixes" followed by an issue number to automatically close related issues when the PR is merged (e.g., "closes #123" or "fixes #123"). - Describe the changes made in the PR. - Ensure the PR has one of the required tags (kind:fix, kind:misc, kind:break!, kind:refactor, kind:feat, kind:deps, kind:docs, kind:ci, kind:chore, kind:testing) --> --------- Co-authored-by: ramin <raminkeene@gmail.com>
Fixes celestiaorg#3003. <!-- Thank you for submitting a pull request! Please make sure you have reviewed our contributors guide before submitting your first PR. Please ensure you've addressed or included references to any related issues. Tips: - Use keywords like "closes" or "fixes" followed by an issue number to automatically close related issues when the PR is merged (e.g., "closes #123" or "fixes #123"). - Describe the changes made in the PR. - Ensure the PR has one of the required tags (kind:fix, kind:misc, kind:break!, kind:refactor, kind:feat, kind:deps, kind:docs, kind:ci, kind:chore, kind:testing) --> --------- Co-authored-by: ramin <raminkeene@gmail.com>
Celestia Node version
v0.12.1
OS
linux
Install tools
No response
Others
No response
Steps to reproduce it
Expected result
start fails with error that
p2p.network
is failed due to empty value providedActual result
celestia mainnet is started
Relevant log output
No response
Notes
No response
The text was updated successfully, but these errors were encountered: