diff --git a/crates/keyfork/src/cli/wizard.rs b/crates/keyfork/src/cli/wizard.rs index a405b2a..2793890 100644 --- a/crates/keyfork/src/cli/wizard.rs +++ b/crates/keyfork/src/cli/wizard.rs @@ -1,6 +1,6 @@ use super::Keyfork; use clap::{Parser, Subcommand}; -use std::{collections::HashSet, fs::OpenOptions, io::IsTerminal, path::PathBuf}; +use std::{collections::HashSet, fs::File, io::IsTerminal, path::PathBuf}; use card_backend_pcsc::PcscBackend; use openpgp_card_sequoia::{state::Open, types::KeyType, Card}; @@ -165,7 +165,7 @@ fn generate_shard_secret( } if let Some(output_file) = output_file { - let output = OpenOptions::new().write(true).open(output_file)?; + let output = File::create(output_file)?; keyfork_shard::openpgp::split(threshold, certs, &seed, output)?; } else { keyfork_shard::openpgp::split(threshold, certs, &seed, std::io::stdout())?;