mirror of
https://codeberg.org/Cyborus/forgejo-cli.git
synced 2024-11-10 12:09:33 +01:00
fmt
This commit is contained in:
parent
4a9f524827
commit
33367ed9c6
1 changed files with 3 additions and 1 deletions
|
@ -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?;
|
||||||
|
|
Loading…
Reference in a new issue