Skip to content

Commit eab5c8f

Browse files
committed
fix: replace tempdir with tempfile
tempdir is deprecated and has a dependency on the remove_dir_all crate that has some known vulnerability in <0.8.0
1 parent 82dc43c commit eab5c8f

File tree

3 files changed

+53
-65
lines changed

3 files changed

+53
-65
lines changed

Cargo.lock

Lines changed: 51 additions & 63 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ directories = "6.0.0"
1515
include_dir = "0.7.4"
1616
regex = "1.11.1"
1717
starlark = "0.13.0"
18-
tempdir = "0.3.7"
18+
tempfile = "3.16.0"
1919
thiserror = "2.0.11"
2020
ureq = "3.0.5"
2121
vsort = "0.2.0"

src/base.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ pub fn base(builder: &mut GlobalsBuilder) {
8383

8484
fn extract_from_url(url: &str, path: &str) -> anyhow::Result<FileContents> {
8585
let path = path.to_string();
86-
let tmp_dir = tempdir::TempDir::new("ubpkg").unwrap();
86+
let tmp_dir = tempfile::TempDir::new().unwrap();
8787
let mut extracted_path = tmp_dir.path().to_path_buf();
8888
extracted_path.push(path.clone());
8989
let mut asset_path = tmp_dir.path().to_path_buf();

0 commit comments

Comments
 (0)