mirror of
https://github.com/sharkdp/hyperfine.git
synced 2024-09-11 22:17:46 +03:00
PR for issue #615
This commit is contained in:
parent
42e85f240c
commit
bbe706bcc1
@ -1,3 +1,4 @@
|
||||
use std::env;
|
||||
use std::fs::{File, OpenOptions};
|
||||
use std::io::Write;
|
||||
|
||||
@ -89,9 +90,19 @@ impl ExportManager {
|
||||
ExportType::Markdown => Box::new(MarkdownExporter::default()),
|
||||
ExportType::Orgmode => Box::new(OrgmodeExporter::default()),
|
||||
};
|
||||
|
||||
self.exporters.push(ExporterWithFilename {
|
||||
exporter,
|
||||
filename: filename.to_string(),
|
||||
filename:
|
||||
if filename == "-" {
|
||||
if env::consts::OS == "windows" {
|
||||
"con:".to_string()
|
||||
} else {
|
||||
"/dev/stdout".to_string()
|
||||
}
|
||||
} else {
|
||||
filename.to_string()
|
||||
},
|
||||
});
|
||||
|
||||
Ok(())
|
||||
|
Loading…
Reference in New Issue
Block a user