diff options
author | Linnnus <[email protected]> | 2024-10-02 09:23:17 +0200 |
---|---|---|
committer | Linnnus <[email protected]> | 2024-10-02 09:23:17 +0200 |
commit | 3783f68927a1a13c8ddcf96ffc3e78c06963414e (patch) | |
tree | 36e717c0589325c27a872e4bf2a80c14c6130fa4 /src/config.rs | |
parent | dbaf06284985617b3e6cabe04377f8bb34c2d378 (diff) |
Be more verbose when loading configuration
Diffstat (limited to 'src/config.rs')
-rw-r--r-- | src/config.rs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/config.rs b/src/config.rs index ef3d708..7254887 100644 --- a/src/config.rs +++ b/src/config.rs @@ -34,6 +34,11 @@ impl Config { let file = File::open(path.as_ref()).map_err(ConfigError::IoReadingConfig)?; let mut config: Config = serde_json::from_reader(file)?; + if config.secret_path.is_relative() { + eprintln!("warning: `secret_path` in configuration is a relative path.\ + This will be resolved relative to the server's CWD at runtime,\ + which is most likely not what you want!"); + } config.secret = fs::read_to_string(&config.secret_path) .map_err(ConfigError::IoReadingSecret)?; |