-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Fix unsafe-reset-all for working with default home #9103
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the fix, could you rebase your PR against main
instead of v0.34.x
f1751fc
to
cd6b78d
Compare
Fixed :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great thanks!
@@ -29,12 +29,20 @@ func registerFlagsRootCmd(cmd *cobra.Command) { | |||
|
|||
// ParseConfig retrieves the default environment configuration, | |||
// sets up the Tendermint root and ensures that the root exists | |||
func ParseConfig() (*cfg.Config, error) { | |||
func ParseConfig(cmd *cobra.Command) (*cfg.Config, error) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It may be better to pass the home path string instead of an entire command but we can clean this up in a later PR
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thx for your comment. I'll clean this up on next issue.
There seems to be a failure in one of the integration tests. I wonder if you need to let viper know the path to read the config from. Something like this:
|
Sorry my bad, I should to test before push PR. |
Ref. #9102
close #9102
tendermint unsafe-reset-all
command should clear client's home directorybut this command is not working with default home flags.
Ad described #9102,
unsafe-reset-all
command try to clear#HOME/data
directory by defaultwhere is not client's home.
To resolve this issue,
ParseConfig
function explicitly get client's homeand set it into config.