Fixed issue with removing dirs (hngh fakeroot)

main
Michal 2 years ago
parent 365e39c657
commit 05631220d5
No known key found for this signature in database
GPG Key ID: A6A1A4DCB22279B9

32
Cargo.lock generated

@ -12,6 +12,7 @@ dependencies = [
"libc",
"mimalloc",
"regex",
"rm_rf",
"serde",
"serde_derive",
"spinoff",
@ -366,6 +367,15 @@ dependencies = [
"unicode-ident",
]
[[package]]
name = "psm"
version = "0.1.20"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f446d0a6efba22928558c4fb4ce0b3fd6c89b0061343e390bf01a703742b8125"
dependencies = [
"cc",
]
[[package]]
name = "quote"
version = "1.0.20"
@ -399,6 +409,15 @@ version = "0.6.27"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a3f87b73ce11b1619a3c6332f45341e0047173771e8b8b73f87bfeefb7b56244"
[[package]]
name = "rm_rf"
version = "0.6.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3443b7a35aa12ed2e99edfc0ecbefe6a53b4848305cc83e29981dfa1aea1f71e"
dependencies = [
"stacker",
]
[[package]]
name = "rustversion"
version = "1.0.8"
@ -476,6 +495,19 @@ dependencies = [
"yansi",
]
[[package]]
name = "stacker"
version = "0.1.15"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c886bd4480155fd3ef527d45e9ac8dd7118a898a46530b7b94c3e21866259fce"
dependencies = [
"cc",
"cfg-if",
"libc",
"psm",
"winapi",
]
[[package]]
name = "strip-ansi-escapes"
version = "0.1.1"

@ -30,6 +30,7 @@ tabled = { version = "0.8.0", default-features = false, features = ["derive", "c
crossterm = { version = "0.24.0", default-features = false }
regex = { version = "1.6.0", default-features = false, features = ["std"] }
spinoff = { version = "0.4.0", default-features = false }
rm_rf = { version = "0.6.2", default-features = false }
[target.'cfg(target_os = "linux")'.dependencies]
mimalloc = { version = "0.1.29" }

@ -13,8 +13,8 @@ on_gen = true
[repositories]
repos = [
"crs:malachite/development:0a5bdc9",
"mic:apod:v.1.1.2",
"crs:malachite/development:0a5bdc9", # Note, in this example, these two
"mic:apod:v.1.1.2", # will fail to build.
"pkg:pfetch!",
]

@ -120,8 +120,8 @@ pub fn build(packages: &[String], exclude: Vec<String>, no_regen: bool, verbose:
if !errored.is_empty() {
log!(verbose, "Errored packages: \n{:?}", error_strings);
info!(
"The following packages build jobs returned a non-zero exit code: {}",
error_strings.join("\n")
"The following packages build jobs returned a non-zero exit code: \n {}",
error_strings.join("\n ")
);
}
}

@ -39,7 +39,7 @@ pub fn clean(verbose: bool, force: bool) {
log!(verbose, "Current directory: {}", root_dir.display());
}
if !unclean_dirs.is_empty() && !force {
if !unclean_dirs.is_empty() && !force && crate::parse_cfg(verbose).base.mode == "workspace" {
crash!(
AppExitCode::NotClean,
"The following directories are not clean: \n {}\n\
@ -50,7 +50,8 @@ pub fn clean(verbose: bool, force: bool) {
log!(verbose, "Paths with mlc.toml excluded: {:?}", dirs);
for dir in &dirs {
std::fs::remove_dir_all(dir).unwrap();
log!(verbose, "Deleting directory: {}", dir);
rm_rf::remove(dir).unwrap();
}
info!(
"Reset complete, dirs removed: \n \

Loading…
Cancel
Save