Improve error message on `solana-keygen new` filesystem permission errors

This commit is contained in:
Michael Vines 2020-04-16 10:10:59 -07:00
parent 30b3862770
commit 16b2d41dd6
1 changed files with 2 additions and 1 deletions

View File

@ -457,7 +457,8 @@ fn do_main(matches: &ArgMatches<'_>) -> Result<(), Box<dyn error::Error>> {
let keypair = keypair_from_seed(seed.as_bytes())?;
if let Some(outfile) = outfile {
output_keypair(&keypair, &outfile, "new")?;
output_keypair(&keypair, &outfile, "new")
.map_err(|err| format!("Unable to write {}: {}", outfile, err))?;
}
let silent = matches.is_present("silent");