mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-01 23:12:02 +00:00
Remove potential __pycache__
directories from src tarballs
This commit is contained in:
parent
63d6ce03b3
commit
8caef4e6c3
@ -1028,6 +1028,20 @@ impl Step for PlainSourceTarball {
|
|||||||
builder.create(&cargo_config_dir.join("config.toml"), &config);
|
builder.create(&cargo_config_dir.join("config.toml"), &config);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Delete extraneous directories
|
||||||
|
// FIXME: if we're managed by git, we should probably instead ask git if the given path
|
||||||
|
// is managed by it?
|
||||||
|
for entry in walkdir::WalkDir::new(tarball.image_dir())
|
||||||
|
.follow_links(true)
|
||||||
|
.into_iter()
|
||||||
|
.filter_map(|e| e.ok())
|
||||||
|
{
|
||||||
|
if entry.path().is_dir() && entry.path().file_name() == Some(OsStr::new("__pycache__"))
|
||||||
|
{
|
||||||
|
t!(fs::remove_dir_all(entry.path()));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
tarball.bare()
|
tarball.bare()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user