From 83bc532622b8590290f5ede15c646e70affb3242 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 9 Oct 2023 01:41:00 +0000 Subject: [PATCH 1/2] chore(deps): bump dialoguer from 0.10.4 to 0.11.0 Bumps [dialoguer](https://github.com/console-rs/dialoguer) from 0.10.4 to 0.11.0. - [Changelog](https://github.com/console-rs/dialoguer/blob/master/CHANGELOG.md) - [Commits](https://github.com/console-rs/dialoguer/compare/v0.10.4...v0.11.0) --- updated-dependencies: - dependency-name: dialoguer dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- Cargo.lock | 5 +++-- Cargo.toml | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index f20516b931..0e3476fee6 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -447,13 +447,14 @@ checksum = "f2696e8a945f658fd14dc3b87242e6b80cd0f36ff04ea560fa39082368847946" [[package]] name = "dialoguer" -version = "0.10.4" +version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "59c6f2989294b9a498d3ad5491a79c6deb604617378e1cdc4bfc1c1361fe2f87" +checksum = "658bce805d770f407bc62102fca7c2c64ceef2fbcb2b8bd19d2765ce093980de" dependencies = [ "console", "shell-words", "tempfile", + "thiserror", "zeroize", ] diff --git a/Cargo.toml b/Cargo.toml index 67f78be1c9..ee4e8a41f9 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -46,7 +46,7 @@ color-eyre = "0.6" color-print = "0.3" console = "0.15" ctrlc = "3.4" -dialoguer = { version = "0.10", features = [] } +dialoguer = { version = "0.11", features = [] } dirs-next = "2.0" dotenvy = "0.15" duct = "0.13" From 8fca54f2986d27373cc1e4dab85fdc0b752b91a1 Mon Sep 17 00:00:00 2001 From: Jacob Lorenzen Date: Wed, 11 Oct 2023 02:45:50 +0200 Subject: [PATCH 2/2] chore: map dialouger::Error to std:Error (#934) --- src/ui/prompt.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/ui/prompt.rs b/src/ui/prompt.rs index ceac2760a6..a97ca40b4c 100644 --- a/src/ui/prompt.rs +++ b/src/ui/prompt.rs @@ -13,5 +13,8 @@ pub fn confirm(message: &str) -> io::Result { if !console::user_attended_stderr() { return Ok(false); } - Confirm::new().with_prompt(message).interact() + match Confirm::new().with_prompt(message).interact() { + Ok(choice) => Ok(choice), + Err(e) => Err(io::Error::new(io::ErrorKind::Other, e)), + } }