Skip to content

Commit

Permalink
Fixed unpack.rs
Browse files Browse the repository at this point in the history
  • Loading branch information
prsabahrami committed Aug 21, 2024
1 parent 5a409cc commit 2c70aa1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 34 deletions.
36 changes: 4 additions & 32 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions src/unpack.rs
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,11 @@ pub async fn unpack(options: UnpackOptions) -> Result<()> {

tracing::info!("Unarchiving pack to {}", unpack_dir.display());
if options.pack_file.extension().unwrap_or_default() == "sh" {
unarchive_from_shellscript(&options.pack_file, &unpack_dir)
unarchive_from_shellscript(&options.pack_file, unpack_dir)
.await
.map_err(|e| anyhow!("Could not extract archive from shell script: {}", e))?;
} else {
unarchive(&options.pack_file, &unpack_dir)
unarchive(&options.pack_file, unpack_dir)
.await
.map_err(|e| anyhow!("Could not unarchive: {}", e))?;
}
Expand Down

0 comments on commit 2c70aa1

Please sign in to comment.