add protections against nuking curze
This commit is contained in:
parent
993af25bdf
commit
18f498bb77
4 changed files with 10 additions and 3 deletions
|
@ -1 +1 @@
|
|||
1
|
||||
2
|
||||
|
|
2
Cargo.lock
generated
2
Cargo.lock
generated
|
@ -197,7 +197,7 @@ checksum = "e496a50fda8aacccc86d7529e2c1e0892dbd0f898a6b5645b5561b89c3210efa"
|
|||
|
||||
[[package]]
|
||||
name = "curze"
|
||||
version = "0.3.1"
|
||||
version = "0.3.2"
|
||||
dependencies = [
|
||||
"clap",
|
||||
"home",
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
[package]
|
||||
name = "curze"
|
||||
version = "0.3.1"
|
||||
version = "0.3.2"
|
||||
edition = "2021"
|
||||
|
||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||
|
|
|
@ -142,6 +142,13 @@ fn uninstall_package(package: String) {
|
|||
return;
|
||||
}
|
||||
|
||||
if package == "meta/curze" {
|
||||
println!("EROR: curze cannot be uninstalled automatically.");
|
||||
println!("EROR: Removing curze is not recommended without first uninstalling everything");
|
||||
println!("EROR: and verifying it all before uninstalling manually.");
|
||||
return;
|
||||
}
|
||||
|
||||
if Path::new(&format!("{}/.local/share/curze/{}.version", home, realised_name)).exists() {
|
||||
if Path::new(&format!("{}/.local/share/curze/cache/{}/", home, realised_name)).exists() { }
|
||||
else {
|
||||
|
|
Reference in a new issue