Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: enable rest plugin only if in config or if --rest-http-port is set #1593

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions zenohd/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -127,9 +127,8 @@ fn config_from_args(args: &Args) -> Config {
if let Some(id) = &args.id {
config.set_id(id.parse().unwrap()).unwrap();
}
// apply '--rest-http-port' to config only if explicitly set (overwriting config),
// or if no config file is set (to apply its default value)
if args.rest_http_port.is_some() || args.config.is_none() {
// apply '--rest-http-port' to config only if explicitly set (overwriting config)
if args.rest_http_port.is_some() {
let value = args.rest_http_port.as_deref().unwrap_or("8000");
if !value.eq_ignore_ascii_case("none") {
config
Expand Down
Loading