diff --git a/Cargo.lock b/Cargo.lock index 9fb0f36..aee50dd 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -105,7 +105,6 @@ dependencies = [ "cfg-if", "clap", "insta", - "owo-colors", "rustversion", "serde", "toml", @@ -297,12 +296,6 @@ version = "1.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dd8b5dd2ae5ed71462c540258bedcb51965123ad7e7ccf4b9a8cafaa4a63576d" -[[package]] -name = "owo-colors" -version = "3.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1b04fb49957986fdce4d6ee7a65027d55d4b6d2265e5848bbb507b58ccfdb6f" - [[package]] name = "predicates" version = "3.0.4" diff --git a/Cargo.toml b/Cargo.toml index 39f6cf1..e1f8784 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -19,13 +19,12 @@ required-features = ["cli"] [features] default = ["cli"] -cli = ["dep:clap", "dep:owo-colors"] +cli = ["dep:clap"] [dependencies] anyhow = "1.0.40" cfg-if = "1.0.0" clap = { version = "4.3.19", optional = true } -owo-colors = { version = "3.5.0", optional = true } rustversion = "1.0.14" serde = { version = "1.0.149", features = ["derive"] } toml = "0.5.9" diff --git a/src/cli.rs b/src/cli.rs index 4603a07..8718990 100644 --- a/src/cli.rs +++ b/src/cli.rs @@ -5,7 +5,6 @@ use anyhow::Result; use clap::Arg; use clap::ArgMatches; use clap::Command; -use owo_colors::OwoColorize; use crate::binary; use crate::cargo_config; @@ -18,13 +17,13 @@ fn install_all_binaries() -> Result<()> { binary::install(binary_package)?; } - println!("{}", "Done!".green()); + println!("\x1b[32m{}\x1b[0m", "Done!"); return Ok(()); } fn sync_aliases() -> Result<()> { cargo_config::sync_aliases()?; - println!("{}", "Done!".green()); + println!("\x1b[32m{}\x1b[0m", "Done!"); return Ok(()); } diff --git a/src/main.rs b/src/main.rs index 4b86cf0..640466c 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,14 +1,12 @@ use std::process; -use owo_colors::OwoColorize; - fn main() { let res = cargo_run_bin::cli::run(); // Only reached if run-bin code fails, otherwise process exits early from within // binary::run. if let Err(res) = res { - eprintln!("{}", format!("run-bin failed: {res}").red()); + eprintln!("\x1b[31m{}\x1b[0m", format!("run-bin failed: {res}")); process::exit(1); } }