Allow multiple --accounts arguments
This commit is contained in:
parent
57b03c5bc1
commit
8082a2454c
|
@ -1008,6 +1008,7 @@ pub fn main() {
|
|||
.long("accounts")
|
||||
.value_name("PATHS")
|
||||
.takes_value(true)
|
||||
.multiple(true)
|
||||
.help("Comma separated persistent accounts location"),
|
||||
)
|
||||
.arg(
|
||||
|
@ -1529,8 +1530,13 @@ pub fn main() {
|
|||
solana_net_utils::parse_port_range(matches.value_of("dynamic_port_range").unwrap())
|
||||
.expect("invalid dynamic_port_range");
|
||||
|
||||
let account_paths = if let Some(account_paths) = matches.value_of("account_paths") {
|
||||
account_paths.split(',').map(PathBuf::from).collect()
|
||||
let account_paths: Vec<PathBuf> =
|
||||
if let Ok(account_paths) = values_t!(matches, "account_paths", String) {
|
||||
account_paths
|
||||
.join(",")
|
||||
.split(',')
|
||||
.map(PathBuf::from)
|
||||
.collect()
|
||||
} else {
|
||||
vec![ledger_path.join("accounts")]
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue