Skip to content

Commit

Permalink
fix(config): correctly parse env variables (#1607)
Browse files Browse the repository at this point in the history
* fix(config): do not split env variables by _
  • Loading branch information
folex committed May 6, 2023
1 parent c3c8b23 commit 2f77e04
Showing 1 changed file with 3 additions and 3 deletions.
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

0 comments on commit 2f77e04

Please sign in to comment.