Skip to content

Commit

Permalink
chore: Drop owo
Browse files Browse the repository at this point in the history
  • Loading branch information
dustinblackman committed Jul 5, 2024
1 parent 08f85cc commit 1e1b0f4
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 15 deletions.
7 changes: 0 additions & 7 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 Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
5 changes: 2 additions & 3 deletions src/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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(());
}

Expand Down
4 changes: 1 addition & 3 deletions src/main.rs
Original file line number Diff line number Diff line change
@@ -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);
}
}

0 comments on commit 1e1b0f4

Please sign in to comment.