aboutsummaryrefslogtreecommitdiff
path: root/src/garage/repair/offline.rs
diff options
context:
space:
mode:
authorAlex <alex@adnab.me>2023-02-06 14:18:58 +0000
committerAlex <alex@adnab.me>2023-02-06 14:18:58 +0000
commitd14678e0ac4511156d651cd1f5bf05474e92b6bb (patch)
treed68053ff8b09592dfa30345027888235e90c6b67 /src/garage/repair/offline.rs
parentfba8224cf00f7c542150e48a88c22025ff03b948 (diff)
parent80e232699825c5c512e8714e08b6a80992a06498 (diff)
downloadgarage-d14678e0ac4511156d651cd1f5bf05474e92b6bb.tar.gz
garage-d14678e0ac4511156d651cd1f5bf05474e92b6bb.zip
Merge pull request 'Secrets can be passed directly in config, as file, or as env' (#499) from config-files-env into main
Reviewed-on: https://git.deuxfleurs.fr/Deuxfleurs/garage/pulls/499
Diffstat (limited to 'src/garage/repair/offline.rs')
-rw-r--r--src/garage/repair/offline.rs9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/garage/repair/offline.rs b/src/garage/repair/offline.rs
index 25193e4a..f4edcf03 100644
--- a/src/garage/repair/offline.rs
+++ b/src/garage/repair/offline.rs
@@ -6,8 +6,13 @@ use garage_util::error::*;
use garage_model::garage::Garage;
use crate::cli::structs::*;
+use crate::{fill_secrets, Secrets};
-pub async fn offline_repair(config_file: PathBuf, opt: OfflineRepairOpt) -> Result<(), Error> {
+pub async fn offline_repair(
+ config_file: PathBuf,
+ secrets: Secrets,
+ opt: OfflineRepairOpt,
+) -> Result<(), Error> {
if !opt.yes {
return Err(Error::Message(
"Please add the --yes flag to launch repair operation".into(),
@@ -15,7 +20,7 @@ pub async fn offline_repair(config_file: PathBuf, opt: OfflineRepairOpt) -> Resu
}
info!("Loading configuration...");
- let config = read_config(config_file)?;
+ let config = fill_secrets(read_config(config_file)?, secrets);
info!("Initializing Garage main data store...");
let garage = Garage::new(config)?;