We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 9d947eb + 5ad54e9 commit a4014d1Copy full SHA for a4014d1
src/bin/crates-admin/migrate.rs
@@ -47,11 +47,10 @@ pub async fn run(_opts: Opts) -> Result<(), Error> {
47
48
spawn_blocking(move || {
49
info!("Migrating the database");
50
- let mut stdout = std::io::stdout();
51
- let mut harness = HarnessWithOutput::new(&mut conn, &mut stdout);
52
- harness
+ HarnessWithOutput::write_to_stdout(&mut conn)
53
.run_pending_migrations(MIGRATIONS)
54
- .map_err(|err| anyhow!("Failed to run migrations: {err}"))?;
+ .map_err(|e| anyhow!(e))
+ .context("Failed to run migrations")?;
55
56
info!("Synchronizing crate categories");
57
crates_io::boot::categories::sync_with_connection(CATEGORIES_TOML, &mut conn)?;
0 commit comments