changed spinner stop

main
ad4mx 2 years ago
parent 809211f72c
commit 413f94a5eb

4
Cargo.lock generated

@ -485,9 +485,9 @@ checksum = "2fd0db749597d91ff862fd1d55ea87f7855a744a8425a64695b6fca237d1dad1"
[[package]]
name = "spinoff"
version = "0.4.0"
version = "0.5.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7d3f754b5a185a81fa60acbd32f095411e276743d27307a531d34eae5d49c991"
checksum = "01e1a863da0489c765f2642597c8d367a0a3939184b4775306d7fffdb455d952"
dependencies = [
"maplit",
"once_cell",

@ -29,7 +29,7 @@ colored = { version = "2.0.0", default-features = false }
tabled = { version = "0.8.0", default-features = false, features = ["derive", "color"] }
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 }
spinoff = { version = "0.5.0", default-features = false }
rm_rf = { version = "0.6.2", default-features = false }
[target.'cfg(target_os = "linux")'.dependencies]

@ -161,14 +161,8 @@ pub fn info(verbose: bool) {
.output()
.unwrap();
// Because spinoff requires &'static str, we need to Box these in the heap and then leak them to be able to format the spinner
let symbol = Box::new(format!("{}", "✔".bold().green()));
let done = Box::new(format!("{}", "Done!".bold()));
let symbol: &'static str = Box::leak(symbol);
let done: &'static str = Box::leak(done);
sp.stop_and_persist(symbol, done);
// Stop the spinner with a success message
sp.success("Done!");
log!(verbose, "Repos: {:?}", repos);
}

Loading…
Cancel
Save