Skip to content

Commit eb84e37

Browse files
bachorpcgwalters
authored andcommitted
cli: use file extension for host spec to be edited
Signed-off-by: Pascal Bachor <bachorp@users.noreply.github.com>
1 parent 40dafdb commit eb84e37

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

crates/lib/src/cli.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1284,7 +1284,7 @@ async fn edit_ostree(
12841284
let mut r = std::io::BufReader::new(std::fs::File::open(filename)?);
12851285
serde_yaml::from_reader(&mut r)?
12861286
} else {
1287-
let tmpf = tempfile::NamedTempFile::new()?;
1287+
let tmpf = tempfile::NamedTempFile::with_suffix(".yaml")?;
12881288
serde_yaml::to_writer(std::io::BufWriter::new(tmpf.as_file()), &host)?;
12891289
crate::utils::spawn_editor(&tmpf)?;
12901290
tmpf.as_file().seek(std::io::SeekFrom::Start(0))?;

0 commit comments

Comments
 (0)