Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions src/autoresearch.rs
Original file line number Diff line number Diff line change
Expand Up @@ -104,8 +104,9 @@ impl AutoresearchConfig {
Ok(())
}

pub fn load(path: &Path) -> anyhow::Result<Self> {
let content = std::fs::read_to_string(path)
pub async fn load(path: &Path) -> anyhow::Result<Self> {
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()))?;
Expand Down
2 changes: 1 addition & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
Loading