WIP: Windows support #925
1 changed files with 4 additions and 0 deletions
|
@ -52,10 +52,14 @@ pub struct Secrets {
|
||||||
/// from config or CLI param or env variable or read from a file specified in config or CLI
|
/// from config or CLI param or env variable or read from a file specified in config or CLI
|
||||||
/// param or env variable)
|
/// param or env variable)
|
||||||
pub fn fill_secrets(mut config: Config, secrets: Secrets) -> Result<Config, Error> {
|
pub fn fill_secrets(mut config: Config, secrets: Secrets) -> Result<Config, Error> {
|
||||||
|
#[cfg(unix)]
|
||||||
let allow_world_readable = secrets
|
let allow_world_readable = secrets
|
||||||
.allow_world_readable_secrets
|
.allow_world_readable_secrets
|
||||||
.unwrap_or(config.allow_world_readable_secrets);
|
.unwrap_or(config.allow_world_readable_secrets);
|
||||||
|
|
||||||
|
#[cfg(not(unix))]
|
||||||
|
let allow_world_readable = config.allow_world_readable_secrets;
|
||||||
|
|
||||||
fill_secret(
|
fill_secret(
|
||||||
&mut config.rpc_secret,
|
&mut config.rpc_secret,
|
||||||
&config.rpc_secret_file,
|
&config.rpc_secret_file,
|
||||||
|
|
Loading…
Reference in a new issue