Throw and error when the index is not found

Co-authored-by: Louis Dureuil <louis@meilisearch.com>
This commit is contained in:
Clément Renault 2025-01-30 11:07:43 +01:00 committed by GitHub
parent c72f114b33
commit 71bb24f17e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -443,7 +443,8 @@ fn compact_index(db_path: PathBuf, index_name: &str) -> anyhow::Result<()> {
drop(new_file);
println!("Everything's done 🎉");
return Ok(())
}
Ok(())
bail!("Target index {index_name} not found!")
}