mirror of
https://github.com/cargo-bins/cargo-binstall.git
synced 2025-05-03 18:50:02 +00:00
Fix untar
when desired_outputs
is not None
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
This commit is contained in:
parent
29b28a4f8f
commit
d2e688c4c2
1 changed files with 3 additions and 1 deletions
|
@ -1,5 +1,5 @@
|
|||
use std::borrow::Cow;
|
||||
use std::fs::File;
|
||||
use std::fs::{self, File};
|
||||
use std::io::Read;
|
||||
use std::path::Path;
|
||||
|
||||
|
@ -29,6 +29,8 @@ fn untar(
|
|||
if desired_outputs.contains(&entry_path) {
|
||||
let dst = path.join(entry_path);
|
||||
|
||||
fs::create_dir_all(dst.parent().unwrap())?;
|
||||
|
||||
entry.unpack(dst)?;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue