diff options
Diffstat (limited to 'cli/tools/compile.rs')
-rw-r--r-- | cli/tools/compile.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/cli/tools/compile.rs b/cli/tools/compile.rs index bb03f03d2..f0534abc3 100644 --- a/cli/tools/compile.rs +++ b/cli/tools/compile.rs @@ -124,12 +124,13 @@ pub async fn compile( )); let temp_path = output_path.with_file_name(temp_filename); - let mut file = std::fs::File::create(&temp_path).with_context(|| { + let file = std::fs::File::create(&temp_path).with_context(|| { format!("Opening temporary file '{}'", temp_path.display()) })?; + let write_result = binary_writer .write_bin( - &mut file, + file, eszip, root_dir_url, &module_specifier, @@ -140,7 +141,6 @@ pub async fn compile( .with_context(|| { format!("Writing temporary file '{}'", temp_path.display()) }); - drop(file); // set it as executable #[cfg(unix)] |