Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tasks: correctly indent final status #1470

Merged
merged 1 commit into from
Sep 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
130 changes: 22 additions & 108 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions devenv/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,9 @@ default-run = "devenv"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
ansiterm.workspace = true
clap.workspace = true
cli-table.workspace = true
crossterm = "0.28.1"
console = "0.15.8"
dotlock.workspace = true
fs2.workspace = true
hex.workspace = true
Expand Down
16 changes: 8 additions & 8 deletions devenv/src/log.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use ansiterm::Colour::{Blue, DarkGray, Green, Red, Yellow};
use console::style;
use std::io::Write;
use std::time::Instant;

Expand Down Expand Up @@ -33,7 +33,7 @@ pub struct LogProgress {

impl LogProgress {
pub fn new(message: &str, newline: bool) -> LogProgress {
let prefix = Blue.paint("•");
let prefix = style("•").blue();
eprint!("{} {} ...", prefix, message);
if newline {
eprintln!();
Expand All @@ -51,9 +51,9 @@ impl Drop for LogProgress {
fn drop(&mut self) {
let duration = self.start.unwrap_or_else(Instant::now).elapsed();
let prefix = if self.failed {
Red.paint("✖")
style("✖").red()
} else {
Green.paint("✔")
style("✔").green()
};
eprintln!(
"\r{} {} in {:.1}s.",
Expand Down Expand Up @@ -105,19 +105,19 @@ impl Logger {
}
match level {
Level::Info => {
let prefix = Blue.paint("•");
let prefix = style("•").blue();
eprintln!("{} {}", prefix, message);
}
Level::Error => {
let prefix = Red.paint("✖");
let prefix = style("✖").red();
eprintln!("{} {}", prefix, message);
}
Level::Warn => {
let prefix = Yellow.paint("•");
let prefix = style("•").yellow();
eprintln!("{} {}", prefix, message);
}
Level::Debug => {
let prefix = DarkGray.paint("•");
let prefix = style("•").italic();
eprintln!("{} {}", prefix, message);
}
Level::Silent => {}
Expand Down
Loading
Loading