Skip to content

Commit 0f05499

Browse files
committed
Fix cli options (#4772)
## Issue Addressed Fixes breaking change introduced on #4674 that doesn't allow multiple `http_enabled` `ArgGroup` flags
1 parent fbb6997 commit 0f05499

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
@@ -1273,5 +1273,5 @@ pub fn cli_app<'a, 'b>() -> App<'a, 'b> {
12731273
.default_value("64")
12741274
.takes_value(true)
12751275
)
1276-
.group(ArgGroup::with_name("enable_http").args(&["http", "gui", "staking"]))
1276+
.group(ArgGroup::with_name("enable_http").args(&["http", "gui", "staking"]).multiple(true))
12771277
}

lighthouse/tests/beacon_node.rs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2337,6 +2337,18 @@ fn gui_flag() {
23372337
});
23382338
}
23392339

2340+
#[test]
2341+
fn multiple_http_enabled_flags() {
2342+
CommandLineTest::new()
2343+
.flag("gui", None)
2344+
.flag("http", None)
2345+
.flag("staking", None)
2346+
.run_with_zero_port()
2347+
.with_config(|config| {
2348+
assert!(config.http_api.enabled);
2349+
});
2350+
}
2351+
23402352
#[test]
23412353
fn optimistic_finalized_sync_default() {
23422354
CommandLineTest::new()

0 commit comments

Comments
 (0)