docs: add explaination on how to change home folder globaly (backport #16620) (#16622)

Co-authored-by: Julien Robert <julien@rbrt.fr>
This commit is contained in:
mergify[bot] 2023-06-20 17:44:11 +02:00 committed by GitHub
parent e9ba371ef2
commit 9b1d32b78d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 2 deletions

View File

@ -30,7 +30,12 @@ Before actually running the node, we need to initialize the chain, and most impo
simd init <moniker> --chain-id my-test-chain
```
The command above creates all the configuration files needed for your node to run, as well as a default genesis file, which defines the initial state of the network. All these configuration files are in `~/.simapp` by default, but you can overwrite the location of this folder by passing the `--home` flag.
The command above creates all the configuration files needed for your node to run, as well as a default genesis file, which defines the initial state of the network.
:::tip
All these configuration files are in `~/.simapp` by default, but you can overwrite the location of this folder by passing the `--home` flag to each commands,
or set an `$APPD_HOME` environment variable (where `APPD` is the name of the binary).
:::
The `~/.simapp` folder has the following structure:

View File

@ -8,7 +8,8 @@ import (
func HomeCommand() *cobra.Command {
return &cobra.Command{
Use: "home",
Short: "Outputs the string being used as the home path. No home directory is set when using the tool standalone.",
Short: "Outputs the folder used as the binary home. No home directory is set when using the tool standalone.",
Long: `Outputs the folder used as the binary home. In order to change the home directory path, set the $APPD_HOME environment variable, or use the "--home" flag.`,
Args: cobra.NoArgs,
Run: func(cmd *cobra.Command, args []string) {
clientCtx := client.GetClientContextFromCmd(cmd)