Skip to content

Using gaiacli config node breaks ~/.gaiacli/config/config.toml #3899

Closed
@mperklin

Description

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

  1. Install cosmos-sdk and ensure gaiacli is working as expected
  2. 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.
  3. 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"
  1. 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
  2. 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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions