Skip to content
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

Fork-network command doesn’t accept suffix starting with dash #10034

Closed
vlad-kopcil opened this issue Oct 30, 2023 · 1 comment
Closed

Fork-network command doesn’t accept suffix starting with dash #10034

vlad-kopcil opened this issue Oct 30, 2023 · 1 comment
Assignees
Labels

Comments

@vlad-kopcil
Copy link
Contributor

Describe the bug
While the default chain id starts with dash, given the help screen
--chain-id-suffix <CHAIN_ID_SUFFIX>
[default: -fork]

We can’t do the same from command line

To Reproduce

neard.polina --unsafe-fast-startup fork-network --validators /opt/validators.json --epoch-length 1000 --chain-id-suffix -really
error: a value is required for '--chain-id-suffix <CHAIN_ID_SUFFIX>' but none was supplied
neard.polina --unsafe-fast-startup fork-network --validators /opt/validators.json --epoch-length 1000 --chain-id-suffix -fork
error: unexpected argument '-f' found
/opt/neard.polina --unsafe-fast-startup fork-network --validators /opt/validators.json --epoch-length 1000 --chain-id-suffix \-fork
error: unexpected argument '-f' found

When tried with --chain-id-suffix=-fork, the parameter was ignored completely.

Expected behavior
We should be able to use any suffix we like, including dash as the first character.
There's multiple way how to handle values with dash as the first character. Usually the quoting is the best call.
As we already support the long arguments, the assignment operator is also viable option here.
The work around might be to add dash always by the code, and only expect the test after as the parameter.

Version (please complete the following information):

github-merge-queue bot pushed a commit that referenced this issue Nov 6, 2023
Fix for #10034

`chain_id_suffix` can now start with however many hyphens we want
@posvyatokum
Copy link
Member

Fixed in #10101

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants