Skip to content

Commit

Permalink
buck2: profile: take console_opts
Browse files Browse the repository at this point in the history
Summary:
There is no reason to force a Superconsole here + it makes the rest of
this stack simpler.

Reviewed By: IanChilds

Differential Revision: D39810492

fbshipit-source-id: 1ff9d73183515fb03c037280eb917d7404086a5e
  • Loading branch information
krallin authored and facebook-github-bot committed Sep 26, 2022
1 parent 2da1da0 commit 34a238c
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions buck2_client/src/commands/profile.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ use crate::commands::streaming::StreamingCommand;
use crate::common::CommonBuildConfigurationOptions;
use crate::common::CommonConsoleOptions;
use crate::common::CommonDaemonCommandOptions;
use crate::common::ConsoleType;
use crate::daemon::client::BuckdClientConnector;
use crate::exit_result::ExitResult;

Expand Down Expand Up @@ -73,6 +72,9 @@ pub struct ProfileOptions {
#[clap(flatten)]
config_opts: CommonBuildConfigurationOptions,

#[clap(flatten)]
console_opts: CommonConsoleOptions,

#[clap(flatten)]
event_log_opts: CommonDaemonCommandOptions,

Expand Down Expand Up @@ -191,11 +193,7 @@ impl StreamingCommand for ProfileSubcommand {
}

fn console_opts(&self) -> &CommonConsoleOptions {
static OPTS: CommonConsoleOptions = CommonConsoleOptions {
console_type: ConsoleType::Auto,
ui: vec![],
};
&OPTS
&self.opts.console_opts
}

fn event_log_opts(&self) -> &CommonDaemonCommandOptions {
Expand Down

0 comments on commit 34a238c

Please sign in to comment.