Consider config in check_for_usb (#9555)

This commit is contained in:
Tyera Eulberg
2020-04-17 11:37:13 -06:00
committed by GitHub
parent 9bba27a3aa
commit a9c38fb0df
2 changed files with 20 additions and 11 deletions

View File

@ -407,11 +407,12 @@ fn do_main(matches: &ArgMatches<'_>) -> Result<(), Box<dyn error::Error>> {
Config::default()
};
let wallet_manager = if check_for_usb(std::env::args()) {
maybe_wallet_manager()?
} else {
None
};
let wallet_manager =
if check_for_usb(std::env::args()) || check_for_usb([config.keypair_path.clone()].iter()) {
maybe_wallet_manager()?
} else {
None
};
match matches.subcommand() {
("pubkey", Some(matches)) => {