From ee3046212081b5783c63621b9938555a396ca645 Mon Sep 17 00:00:00 2001 From: Petr Gadorek Date: Thu, 30 Jan 2025 10:00:00 +0100 Subject: [PATCH] EIM-120 skip cli params which are empty string --- Cargo.lock | 2 +- Cargo.toml | 4 ++-- src/settings.rs | 3 +++ 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index ed5061a..d3a284e 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1,6 +1,6 @@ # This file is automatically @generated by Cargo. # It is not intended for manual editing. -version = 3 +version = 4 [[package]] name = "Inflector" diff --git a/Cargo.toml b/Cargo.toml index 7229f10..68e92fe 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -21,8 +21,8 @@ config = "0.14.0" toml = "0.8" uuid = {version="1.10.0", features = ["v4"]} tempfile = "3.2" +anyhow = "^1.0" +rust_search = "2.1.0" rustpython-vm = { git = "https://github.com/Hahihula/RustPython.git", branch = "test-rust-build", features = ["freeze-stdlib"], optional = true } rustpython-stdlib = { git = "https://github.com/Hahihula/RustPython.git", branch = "test-rust-build", features = ["ssl-vendor"], optional = true } -anyhow = "^1.0" -rust_search = "2.1.0" diff --git a/src/settings.rs b/src/settings.rs index 2710927..bd82472 100644 --- a/src/settings.rs +++ b/src/settings.rs @@ -97,6 +97,9 @@ impl Settings { for (key, value) in cli_settings { if let Some(v) = value { + if v.to_string().len() < 1 as usize { + continue; + } if key != "config" { cfg.set(&key, v)?; }