1
use owo_colors::OwoColorize;
2

            
3
use crate::{config::Config, utils::service::unregister};
4

            
5
pub async fn command() -> Result<(), String> {
6
    println!(
7
        "{}",
8
        "~ Thanks for checking out Protontweaks! ~".blue().bold()
9
    );
10

            
11
    if os_info::get().to_string().contains("NixOS") {
12
        println!(
13
            "{} {}",
14
            "[service] ->",
15
            "skipping due to read only file system...".italic()
16
        );
17
    } else {
18
        println!("{}", "[service] -> removing...");
19
        unregister().await?;
20
        println!("{}", "[service] -> removed successfully!".green());
21
    }
22

            
23
    println!("{}", "[configs] -> cleaning up...");
24
    Config::wipe()?;
25
    println!("{}", "[configs] -> cleaned up successfully!".green());
26

            
27
    Ok(())
28
}