[][src]Function tari_common::configuration::bootstrap::bootstrap_config_from_cli

pub fn bootstrap_config_from_cli(matches: &ArgMatches) -> ConfigBootstrap

Fill in ConfigBootstrap from clap ArgMatches

let matches = clap_app!(myapp =>
    (version: "0.0.10")
    (author: "The Tari Community")
    (about: "The reference Tari cryptocurrency base node implementation")
    (@arg base_path: -b --("base-path") +takes_value "A path to a directory to store your files")
    (@arg config: -c --config +takes_value "A path to the configuration file to use (config.toml)")
    (@arg log_config: -l --("log-config") +takes_value "A path to the logfile configuration (log4rs.yml))")
    (@arg init: -i --init "Create a default configuration file if it doesn't exist")
    (@arg create_id: --("create-id") "Create and save new node identity if one doesn't exist ")
).get_matches();
let bootstrap = bootstrap_config_from_cli(&matches);

Caveats

It will exit with code 1 if no base dir and fails to create one