windows: fix allow-world-readable-secrets config compile error

This commit is contained in:
Brian Picciano 2025-01-14 11:09:24 +01:00
parent 4049ba217f
commit 3e65289b85

View file

@ -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,