Skip to content

Commit b57b577

Browse files
jxsWoodpile37
authored andcommitted
Fix cli options (sigp#4772)
## Issue Addressed Fixes breaking change introduced on sigp#4674 that doesn't allow multiple `http_enabled` `ArgGroup` flags
1 parent 2e0027f commit b57b577

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed

beacon_node/src/cli.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1315,5 +1315,5 @@ pub fn cli_app<'a, 'b>() -> App<'a, 'b> {
13151315
.default_value("64")
13161316
.takes_value(true)
13171317
)
1318-
.group(ArgGroup::with_name("enable_http").args(&["http", "gui", "staking"]))
1318+
.group(ArgGroup::with_name("enable_http").args(&["http", "gui", "staking"]).multiple(true))
13191319
}

lighthouse/tests/beacon_node.rs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2376,6 +2376,18 @@ fn gui_flag() {
23762376
});
23772377
}
23782378

2379+
#[test]
2380+
fn multiple_http_enabled_flags() {
2381+
CommandLineTest::new()
2382+
.flag("gui", None)
2383+
.flag("http", None)
2384+
.flag("staking", None)
2385+
.run_with_zero_port()
2386+
.with_config(|config| {
2387+
assert!(config.http_api.enabled);
2388+
});
2389+
}
2390+
23792391
#[test]
23802392
fn optimistic_finalized_sync_default() {
23812393
CommandLineTest::new()

0 commit comments

Comments
 (0)