This commit is contained in:
Volodymyr Patuta 2020-11-27 22:37:20 +01:00
parent 6a182b7bbc
commit 77625069d6
1 changed files with 1 additions and 1 deletions

View File

@ -34,7 +34,7 @@ pub fn create_dir(category: &str) -> Result<()> {
/// Create a new note.
pub fn create(header: &str, category: &str) -> Result<()> {
let editor = env::var("EDITOR").unwrap_or("/bin/vi".to_owned());
let editor = env::var("EDITOR")?;
let file = format!("{}{}.md", get_path(category)?, header);
create_dir(category)?;
is_duplicate(header, category)?;