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

fix(config): correctly parse env variables #1607

Merged
merged 4 commits into from
May 6, 2023
Merged
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
6 changes: 3 additions & 3 deletions crates/server-config/src/resolved_config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,20 +14,20 @@
* limitations under the License.
*/

use clap::{Args, Command, FromArgMatches};
use std::ffi::OsString;
use std::net::SocketAddr;
use std::ops::{Deref, DerefMut};
use std::str::FromStr;

use crate::args;
use clap::{Args, Command, FromArgMatches};
use figment::{
providers::{Env, Format, Toml},
Figment,
};
use libp2p::core::{multiaddr::Protocol, Multiaddr};
use serde::{Deserialize, Serialize};

use crate::args;
use crate::dir_config::{ResolvedDirConfig, UnresolvedDirConfig};
use crate::node_config::{NodeConfig, UnresolvedNodeConfig};

Expand Down Expand Up @@ -199,7 +199,7 @@ pub fn resolve_config(
};

let config_builder = config_builder
.merge(Env::prefixed("FLUENCE_").split("_"))
.merge(Env::prefixed("FLUENCE_"))
.merge(cli_config);

let unresolved_config: UnresolvedConfig = config_builder.extract()?;
Expand Down
Loading