Using gaiacli config node
breaks ~/.gaiacli/config/config.toml #3899
Closed
Description
opened on Mar 14, 2019
Summary of Bug
When the user uses the gaiacli config node
command to set the node
value, the new value is written successfully to the ~/.gaiacli/config/config.toml
file, however a new line is created with characters from the previously-set node
value.
In short, using the gaiacli config node <newvalue>
command will break your config.toml
file.
This seems to only occur when the new node
value has 2-or-more fewer characters than the old/original node
value.
Steps to Reproduce
- Install
cosmos-sdk
and ensuregaiacli
is working as expected - Set an initial node value that is somewhat long by issuing the command:
gaiacli config node my_local_host:26657
. Note that this new value is 19 characters long. - Confirm the value exists in the
config.toml
file by issuing the command:cat ~/.gaiacli/config/config.toml
. You should see the following output in your terminal:
node = "my_local_host:26657"
- Set a new node value that is shorter than the value you set in step 2 by issuing the command:
gaiacli config node localhost:26657
. Note that this new value is 15 characters long, 4 characters shorter than the value in step test in tests/tendermint/main.go fails #2 above - Confirm the value written to the
config.toml
file by issuing the command:cat ~/.gaiacli/config/config.toml
. You should see the following output in your terminal:
node = "localhost:26657"
57"
Note that three characters (57"
) are now present on the next line in the config file.
6. Attempt to perform any action with gaiacli
. For example, execute the command gaiacli status
7. Observe the following error message:
ERROR: While parsing config: (3, 1): unexpected token
For Admin Use
- Not duplicate issue
- Appropriate labels applied
- Appropriate contributors tagged
- Contributor assigned/self-assigned
Activity