mirror of
https://github.com/sharkdp/hyperfine.git
synced 2026-11-01 17:00:18 +00:00
PR for issue #615
This commit is contained in:
1 parent
42e85f240c
commit
bbe706bcc1
1 file changed
+12
-1
+12
-1
@@ -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(())
|
||||
|
||||
Reference in new issue
Block a user