From e74ad09f6c606ea575aba618113b7da50958a65e Mon Sep 17 00:00:00 2001 From: Richard Menzies Date: Sat, 14 Nov 2020 21:22:48 +0000 Subject: [PATCH] Give a better error message for editor env var empty --- src/components/externaleditor.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/externaleditor.rs b/src/components/externaleditor.rs index e11c58173f..2b1243a33d 100644 --- a/src/components/externaleditor.rs +++ b/src/components/externaleditor.rs @@ -75,7 +75,7 @@ impl ExternalEditorComponent { let mut editor = editor.split_whitespace(); let command = editor.next().ok_or_else(|| { - anyhow!("unable to read editor command") + anyhow!("Environment config variable for opening an editor is empty, check \"GIT_EDITOR\", \"VISUAL\" and \"EDITOR\" environment variables are not empty.") })?; let mut editor: Vec<&OsStr> =