dialoguer 0.10
This commit is contained in:
Generated
+2
-3
@@ -490,12 +490,11 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "dialoguer"
|
||||
version = "0.9.0"
|
||||
version = "0.10.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "61579ada4ec0c6031cfac3f86fdba0d195a7ebeb5e36693bd53cb5999a25beeb"
|
||||
checksum = "a92e7e37ecef6857fdc0c0c5d42fd5b0938e46590c2183cc92dd310a6d078eb1"
|
||||
dependencies = [
|
||||
"console",
|
||||
"lazy_static",
|
||||
"zeroize",
|
||||
]
|
||||
|
||||
|
||||
+1
-1
@@ -27,7 +27,7 @@ age-plugin = "0.4"
|
||||
base64 = "0.20"
|
||||
bech32 = "0.9"
|
||||
console = { version = "0.15", default-features = false }
|
||||
dialoguer = { version = "0.9", default-features = false, features = ["password"] }
|
||||
dialoguer = { version = "0.10", default-features = false, features = ["password"] }
|
||||
env_logger = "0.10"
|
||||
gumdrop = "0.8"
|
||||
hex = "0.4"
|
||||
|
||||
@@ -247,6 +247,7 @@ pub(crate) fn manage(yubikey: &mut YubiKey) -> Result<(), Error> {
|
||||
yubikey_serial = yubikey.serial().to_string(),
|
||||
default_pin = DEFAULT_PIN,
|
||||
))
|
||||
.report(true)
|
||||
.interact()?;
|
||||
yubikey.verify_pin(pin.as_bytes())?;
|
||||
|
||||
|
||||
@@ -372,6 +372,7 @@ fn main() -> Result<(), Error> {
|
||||
.with_prompt(fl!("cli-setup-select-yk"))
|
||||
.items(&reader_names)
|
||||
.default(0)
|
||||
.report(true)
|
||||
.interact_opt()?
|
||||
{
|
||||
Some(yk) => readers_list[yk].open()?,
|
||||
@@ -430,6 +431,7 @@ fn main() -> Result<(), Error> {
|
||||
.with_prompt(fl!("cli-setup-select-slot"))
|
||||
.items(&slots)
|
||||
.default(0)
|
||||
.report(true)
|
||||
.interact_opt()?
|
||||
{
|
||||
Some(slot) => {
|
||||
@@ -447,6 +449,7 @@ fn main() -> Result<(), Error> {
|
||||
|
||||
if Confirm::new()
|
||||
.with_prompt(fl!("cli-setup-use-existing", slot_index = slot_index))
|
||||
.report(true)
|
||||
.interact()?
|
||||
{
|
||||
let stub = key::Stub::new(yubikey.serial(), slot, &recipient);
|
||||
@@ -466,6 +469,7 @@ fn main() -> Result<(), Error> {
|
||||
flags.name.as_deref().unwrap_or("age identity TAG_HEX")
|
||||
))
|
||||
.allow_empty(true)
|
||||
.report(true)
|
||||
.interact_text()?;
|
||||
|
||||
let pin_policy = match Select::new()
|
||||
@@ -483,6 +487,7 @@ fn main() -> Result<(), Error> {
|
||||
})
|
||||
.unwrap(),
|
||||
)
|
||||
.report(true)
|
||||
.interact_opt()?
|
||||
{
|
||||
Some(0) => PinPolicy::Always,
|
||||
@@ -507,6 +512,7 @@ fn main() -> Result<(), Error> {
|
||||
})
|
||||
.unwrap(),
|
||||
)
|
||||
.report(true)
|
||||
.interact_opt()?
|
||||
{
|
||||
Some(0) => TouchPolicy::Always,
|
||||
@@ -518,6 +524,7 @@ fn main() -> Result<(), Error> {
|
||||
|
||||
if Confirm::new()
|
||||
.with_prompt(fl!("cli-setup-generate-new", slot_index = slot_index))
|
||||
.report(true)
|
||||
.interact()?
|
||||
{
|
||||
eprintln!();
|
||||
@@ -545,6 +552,7 @@ fn main() -> Result<(), Error> {
|
||||
"age-yubikey-identity-{}.txt",
|
||||
hex::encode(stub.tag)
|
||||
))
|
||||
.report(true)
|
||||
.interact_text()?;
|
||||
|
||||
let mut file = match OpenOptions::new()
|
||||
@@ -556,6 +564,7 @@ fn main() -> Result<(), Error> {
|
||||
Err(e) if e.kind() == io::ErrorKind::AlreadyExists => {
|
||||
if Confirm::new()
|
||||
.with_prompt(fl!("cli-setup-identity-file-exists"))
|
||||
.report(true)
|
||||
.interact()?
|
||||
{
|
||||
File::create(&file_name)?
|
||||
|
||||
Reference in New Issue
Block a user