Skip to content

Commit

Permalink
suggested change; update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
connormullett committed Mar 24, 2022
1 parent 10d2c10 commit 96ca092
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,12 @@ bootstrap_peers = ["<multiaddress>"]

Example of a [multiaddress](https://github.com/multiformats/multiaddr): `"/ip4/54.186.82.90/tcp/1347/p2p/12D3K1oWKNF7vNFEhnvB45E9mw2B5z6t419W3ziZPLdUDVnLLKGs"`

Forest will look for config files in the following order and priority:
* Paths passed to the command line via the `--config` flag.
* The environment variable `FOREST_CONFIG_PATH`, if no config was passed through command line arguments.
* If none of the above are found, Forest will look in the systems default configuration directory (`$XDG_CONFIG_HOME` on Linux systems).
* After all locations are exhausted and a config file is not found, a default configuration is assumed and used.

### Logging

The Forest logger uses [Rust's log filtering options](https://doc.rust-lang.org/1.1.0/log/index.html#filtering-results) with the `RUST_LOG` environment variable.
Expand Down
5 changes: 1 addition & 4 deletions forest/src/cli/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -160,10 +160,7 @@ impl CliOpts {
// Parse and return the configuration file
read_toml(&toml)?
}
None => match find_default_config() {
Some(cfg) => cfg,
None => Config::default(),
},
None => find_default_config().unwrap_or_default(),
};
if let Some(genesis_file) = &self.genesis {
cfg.genesis_file = Some(genesis_file.to_owned());
Expand Down

0 comments on commit 96ca092

Please sign in to comment.