diff --git a/src/ui/external/editor.rs b/src/ui/external/editor.rs index fb43895c..ea2980aa 100644 --- a/src/ui/external/editor.rs +++ b/src/ui/external/editor.rs @@ -101,7 +101,11 @@ pub fn edit_content(rt: &Runtime, old_content: String) -> (String, bool) { let mut contents = String::new(); File::open(filepath).map(|mut file| { - file.read_to_string(&mut contents); + file.read_to_string(&mut contents).map_err(|e| { + error!("Error reading content: {}", e); + debug!("Error reading content: {:?}", e); + exit(1); + }).is_ok(); (contents, true) }).unwrap_or((old_content, false)) }