diff options
author | Felix Scheinost <fesc@symentis.com> | 2023-01-04 18:28:56 +0100 |
---|---|---|
committer | Felix Scheinost <fesc@symentis.com> | 2023-01-04 18:35:10 +0100 |
commit | f2106c27336d7d03671dbbbcd1401232c2beb61f (patch) | |
tree | e7847561add9e29dd002814085f1dd784684e2d3 /src/garage/main.rs | |
parent | 02e8eb167efa1f08d69fe7f8e6192cde726c45aa (diff) | |
download | garage-f2106c27336d7d03671dbbbcd1401232c2beb61f.tar.gz garage-f2106c27336d7d03671dbbbcd1401232c2beb61f.zip |
Implement `rpc_secret_file`
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)")?[..], |