Skip to content

Commit

Permalink
Rebase split library to latest main
Browse files Browse the repository at this point in the history
  • Loading branch information
haixuanTao committed Jul 26, 2024
1 parent cfcb5d2 commit edf22da
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
4 changes: 2 additions & 2 deletions binaries/cli/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ struct Args {

/// dora-rs cli client
#[derive(Debug, clap::Subcommand)]
enum Command {
pub enum Command {
/// Check if the coordinator and the daemon is running.
Check {
/// Path to the dataflow descriptor file (enables additional checks)
Expand Down Expand Up @@ -248,7 +248,7 @@ enum Lang {
Cxx,
}

fn run(command: Command) -> eyre::Result<()> {
pub fn run(command: Command) -> eyre::Result<()> {
let log_level = env_logger::Builder::new()
.filter_level(log::LevelFilter::Info)
.parse_default_env()
Expand Down
8 changes: 5 additions & 3 deletions binaries/cli/src/main.rs
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
use clap::Parser;
use dora_cli::Command;
use colored::Colorize;
use dora_cli::{run, Command};
#[cfg(feature = "tracing")]
use dora_tracing::set_up_tracing;
use dora_tracing::set_up_tracing_opts;
use eyre::Context;

fn main() {
if let Err(err) = run() {
if let Err(err) = main_inner() {
eprintln!("\n\n{}", "[ERROR]".bold().red());
eprintln!("{err:#}");
std::process::exit(1);
Expand Down Expand Up @@ -48,5 +50,5 @@ fn main_inner() -> eyre::Result<()> {
}
};

dora_cli::run(args.command)
run(args.command)
}

0 comments on commit edf22da

Please sign in to comment.