This commit is contained in:
Cyborus 2023-12-13 00:30:47 -05:00
parent 4a9f524827
commit 33367ed9c6
No known key found for this signature in database

View file

@ -70,7 +70,9 @@ async fn readline(msg: &str) -> eyre::Result<String> {
} }
async fn editor(contents: &mut String, ext: Option<&str>) -> eyre::Result<()> { async fn editor(contents: &mut String, ext: Option<&str>) -> eyre::Result<()> {
let editor = std::path::PathBuf::from(std::env::var_os("EDITOR").ok_or_else(|| eyre!("unable to locate editor"))?); let editor = std::path::PathBuf::from(
std::env::var_os("EDITOR").ok_or_else(|| eyre!("unable to locate editor"))?,
);
let (mut file, path) = tempfile(ext).await?; let (mut file, path) = tempfile(ext).await?;
file.write_all(contents.as_bytes()).await?; file.write_all(contents.as_bytes()).await?;