Skip to content

Commit

Permalink
update default to default_if to comply with requires
Browse files Browse the repository at this point in the history
  • Loading branch information
jxs committed Aug 30, 2023
1 parent 47acde7 commit 151d60f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions validator_client/src/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ pub fn cli_app<'a, 'b>() -> App<'a, 'b> {
.requires("http")
.value_name("PORT")
.help("Set the listen TCP port for the RESTful HTTP API server.")
.default_value("5062")
.default_value_if("http", None, "5062")
.takes_value(true),
)
.arg(
Expand Down Expand Up @@ -242,7 +242,7 @@ pub fn cli_app<'a, 'b>() -> App<'a, 'b> {
.requires("metrics")
.value_name("ADDRESS")
.help("Set the listen address for the Prometheus metrics HTTP server.")
.default_value("127.0.0.1")
.default_value_if("metrics", None, "127.0.0.1")
.takes_value(true),
)
.arg(
Expand All @@ -251,7 +251,7 @@ pub fn cli_app<'a, 'b>() -> App<'a, 'b> {
.requires("metrics")
.value_name("PORT")
.help("Set the listen TCP port for the Prometheus metrics HTTP server.")
.default_value("5064")
.default_value_if("metrics", None, "5064")
.takes_value(true),
)
.arg(
Expand Down

0 comments on commit 151d60f

Please sign in to comment.