Skip to content

Commit

Permalink
Fix overriding run options in gui
Browse files Browse the repository at this point in the history
  • Loading branch information
azarovh committed Dec 19, 2024
1 parent 68dcd2a commit de026fb
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion node-gui/backend/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,8 @@ pub async fn node_initialize(
let run_opts = {
// For the GUI, we configure different defaults, such as disabling RPC server binding
// and enabling logging to a file.
let mut run_opts = RunOptions::default();
let mut run_opts =
opts.command.map_or(RunOptions::default(), |c| c.run_options().clone());
run_opts.rpc_enabled = Some(run_opts.rpc_enabled.unwrap_or(false));
run_opts.log_to_file = Some(run_opts.log_to_file.unwrap_or(true));
run_opts
Expand Down
4 changes: 2 additions & 2 deletions node-lib/src/options.rs
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,8 @@ pub struct RunOptions {
#[clap(long, short, action = clap::ArgAction::SetTrue)]
pub clean_data: Option<bool>,

/// Log to a file instead of stdout
#[clap(long, action = clap::ArgAction::SetTrue)]
/// Log to a file
#[clap(long, action = clap::ArgAction::Set)]
#[arg(hide = true)]
pub log_to_file: Option<bool>,

Expand Down

0 comments on commit de026fb

Please sign in to comment.