We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents c71170a + 1cdcc07 commit ac43e1eCopy full SHA for ac43e1e
crates/cli/src/main.rs
@@ -169,8 +169,15 @@ fn main() -> Result<(), anyhow::Error> {
169
.await?;
170
let bin = eszip.into_bytes();
171
172
- let mut file = File::create(output_path.as_str()).unwrap();
173
- file.write_all(&bin).unwrap();
+ if output_path == "-" {
+ let stdout = std::io::stdout();
174
+ let mut handle = stdout.lock();
175
+
176
+ handle.write_all(&bin)?
177
+ } else {
178
+ let mut file = File::create(output_path.as_str())?;
179
+ file.write_all(&bin)?
180
+ }
181
}
182
Some(("unbundle", sub_matches)) => {
183
let output_path = sub_matches.get_one::<String>("output").cloned().unwrap();
0 commit comments