diff --git a/src/autoresearch.rs b/src/autoresearch.rs index 6185c5f..64fe589 100644 --- a/src/autoresearch.rs +++ b/src/autoresearch.rs @@ -104,8 +104,9 @@ impl AutoresearchConfig { Ok(()) } - pub fn load(path: &Path) -> anyhow::Result { - let content = std::fs::read_to_string(path) + pub async fn load(path: &Path) -> anyhow::Result { + let content = tokio::fs::read_to_string(path) + .await .with_context(|| format!("reading autoresearch spec {}", path.display()))?; let config: Self = toml::from_str(&content) .with_context(|| format!("parsing autoresearch spec {}", path.display()))?; diff --git a/src/main.rs b/src/main.rs index 6876de9..fde3574 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1405,7 +1405,7 @@ async fn main() -> anyhow::Result<()> { } else { workspace.join(spec) }; - let mut autoresearch_config = AutoresearchConfig::load(&spec_path)?; + let mut autoresearch_config = AutoresearchConfig::load(&spec_path).await?; if let Some(iterations) = iterations { autoresearch_config.max_iterations = iterations; }