diff options
author | Alex <alex@adnab.me> | 2023-01-11 16:04:35 +0000 |
---|---|---|
committer | Alex <alex@adnab.me> | 2023-01-11 16:04:35 +0000 |
commit | 94d723f27cea7aa58d11af3e18a165283b40f19a (patch) | |
tree | 529fa2ca6424a83064551d2de0c8688955baa92d /src/garage/main.rs | |
parent | be6b8f419d71640e64bccfe195a573daeeab2263 (diff) | |
parent | d6ea0cbefa6dcf89ea30e1cd2d36854d8160d6b1 (diff) | |
download | garage-94d723f27cea7aa58d11af3e18a165283b40f19a.tar.gz garage-94d723f27cea7aa58d11af3e18a165283b40f19a.zip |
Merge pull request 'Implement `rpc_secret_file`' (#466) from felix.scheinost/garage:feature/implement-rpc-secret-file into main
Reviewed-on: https://git.deuxfleurs.fr/Deuxfleurs/garage/pulls/466
Diffstat (limited to 'src/garage/main.rs')
-rw-r--r-- | src/garage/main.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/garage/main.rs b/src/garage/main.rs index 107b1389..736e11ec 100644 --- a/src/garage/main.rs +++ b/src/garage/main.rs @@ -173,7 +173,7 @@ async fn cli_command(opt: Opt) -> Result<(), Error> { let net_key_hex_str = opt .rpc_secret .as_ref() - .or_else(|| config.as_ref().map(|c| &c.rpc_secret)) + .or_else(|| config.as_ref().and_then(|c| c.rpc_secret.as_ref())) .ok_or("No RPC secret provided")?; let network_key = NetworkKey::from_slice( &hex::decode(net_key_hex_str).err_context("Invalid RPC secret key (bad hex)")?[..], |