Use owo_colors instead of colored (#121)

This is what `miette` uses so seems better to avoid two coloring crates.
This commit is contained in:
Charlie Marsh 2023-10-18 14:57:07 -04:00 committed by GitHub
parent 2d14c0647e
commit 7bc42ca2ce
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 85 additions and 88 deletions

View file

@ -26,13 +26,13 @@ anyhow = { workspace = true }
bitflags = { workspace = true }
cacache = { workspace = true }
clap = { workspace = true, features = ["derive"] }
colored = { workspace = true }
directories = { workspace = true }
fs-err = { workspace = true, features = ["tokio"] }
futures = { workspace = true }
indicatif = { workspace = true }
itertools = { workspace = true }
miette = { workspace = true, features = ["fancy"] }
owo-colors = { workspace = true }
tempfile = { workspace = true }
thiserror = { workspace = true }
tokio = { workspace = true }

View file

@ -4,7 +4,7 @@ use std::io::{stdout, BufWriter};
use std::path::Path;
use anyhow::Result;
use colored::Colorize;
use owo_colors::OwoColorize;
use pubgrub::report::Reporter;
use tracing::debug;

View file

@ -3,8 +3,8 @@ use std::path::Path;
use anyhow::{Context, Result};
use bitflags::bitflags;
use colored::Colorize;
use itertools::{Either, Itertools};
use owo_colors::OwoColorize;
use tracing::debug;
use platform_host::Platform;

View file

@ -2,8 +2,8 @@ use std::fmt::Write;
use std::path::Path;
use anyhow::Result;
use colored::Colorize;
use fs_err::tokio as fs;
use owo_colors::OwoColorize;
use crate::commands::ExitStatus;
use crate::printer::Printer;
@ -25,7 +25,7 @@ pub(crate) async fn venv(
writeln!(
printer,
"Using Python interpreter: {}",
format!("{}", base_python.display()).cyan()
base_python.display().cyan()
)?;
// If the path already exists, remove it.
@ -35,7 +35,7 @@ pub(crate) async fn venv(
writeln!(
printer,
"Creating virtual environment at: {}",
format!("{}", path.display()).cyan()
path.display().cyan()
)?;
// Create the virtual environment.

View file

@ -2,8 +2,8 @@ use std::path::PathBuf;
use std::process::ExitCode;
use clap::{Args, Parser, Subcommand};
use colored::Colorize;
use directories::ProjectDirs;
use owo_colors::OwoColorize;
use crate::commands::ExitStatus;