Skip to content

Commit

Permalink
Revert "fix: make cluster argument not optional since it's required"
Browse files Browse the repository at this point in the history
This reverts commit 8503356.
  • Loading branch information
Mcdostone committed Feb 10, 2025
1 parent b999418 commit 8b472af
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions crates/command/src/command/main_command.rs
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,9 @@ where
#[clap(short, long)]
/// Log level set to 'debug'
pub debug: bool,
#[clap(short = 'c', short_alias='e', alias="environment", long, value_parser = parse_cluster::<T>)]
#[clap(short = 'c', short_alias='e', alias="environment", long, value_parser = parse_cluster::<T>, required_unless_present_any=&["version", "help"])]
/// The cluster to use
cluster: T,
cluster: Option<T>,
/// Topics to consume
#[clap(
short,
Expand Down Expand Up @@ -169,8 +169,8 @@ where
Ok(config)
}

pub(crate) fn cluster(&self) -> T {
self.cluster.clone()
pub fn cluster(&self) -> T {
self.cluster.as_ref().unwrap().clone()
}

fn themes(file: &Path) -> Result<HashMap<String, Theme>, Error> {
Expand Down

0 comments on commit 8b472af

Please sign in to comment.