Skip to content

Commit

Permalink
refactor: Move unpack log to end of unpack
Browse files Browse the repository at this point in the history
  • Loading branch information
delsner committed Sep 5, 2024
1 parent 3cb27e2 commit f362ca5
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/unpack.rs
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,10 @@ pub async fn unpack(options: UnpackOptions) -> Result<()> {
.await
.map_err(|e| anyhow!("Could not create activation script: {}", e))?;

tmp_dir
.close()
.map_err(|e| anyhow!("Could not remove temporary directory: {}", e))?;

tracing::info!(
"Finished unpacking to {}.",
options.output_directory.display(),
Expand All @@ -74,10 +78,6 @@ pub async fn unpack(options: UnpackOptions) -> Result<()> {
options.output_directory.display()
);

tmp_dir
.close()
.map_err(|e| anyhow!("Could not remove temporary directory: {}", e))?;

Ok(())
}

Expand Down

0 comments on commit f362ca5

Please sign in to comment.