clean up minor items

This commit is contained in:
steven-omaha
2023-01-10 15:00:21 +01:00
parent 160e4d0b4c
commit 627f66ea35
6 changed files with 6 additions and 33 deletions
+2 -2
View File
@@ -1,12 +1,12 @@
use std::path::PathBuf;
use std::process::{Command, ExitStatus};
use anyhow::{anyhow, Result};
use anyhow::{anyhow, Context, Result};
use crate::env::get_editor;
pub fn run_edit_command(files: &[PathBuf]) -> Result<ExitStatus> {
let mut cmd = Command::new(get_editor()?);
let mut cmd = Command::new(get_editor().context("getting suitable editor")?);
cmd.current_dir(files[0].parent().unwrap());
for f in files {
cmd.arg(f.to_string_lossy().to_string());