From 0e491fae79fe163a763c5c8efae47a94b1e423f3 Mon Sep 17 00:00:00 2001 From: Vincenzo Palazzo Date: Mon, 6 Mar 2023 15:17:21 +0100 Subject: [PATCH] cli: fix command line silent abort MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fix the command line silents abort when the the `EDITOR` variable is not specified. With this commit the result is reported below ``` ➜ rio git:(main) RAD_PASSPHRASE=12345 rad issue open ✗ Issue failed: editor not configured: the `EDITOR` environment variable is not set ``` Signed-off-by: Vincenzo Palazzo --- radicle-cli/src/commands/issue.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/radicle-cli/src/commands/issue.rs b/radicle-cli/src/commands/issue.rs index 5f44739b..b68ab64f 100644 --- a/radicle-cli/src/commands/issue.rs +++ b/radicle-cli/src/commands/issue.rs @@ -251,7 +251,7 @@ pub fn run(options: Options, ctx: impl term::Context) -> anyhow::Result<()> { description.unwrap_or("Enter a description...".to_owned()) ); - if let Ok(Some(text)) = term::Editor::new().edit(&doc) { + if let Some(text) = term::Editor::new().edit(&doc)? { let mut meta = String::new(); let mut frontmatter = false; let mut lines = text.lines();