Skip to content

Commit 881e409

Browse files
committed
Fix issue where settings.json wasn't copied correctly
1 parent 7d17638 commit 881e409

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

crates/chat-cli/src/cli/migrate.rs

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -85,11 +85,6 @@ impl MigrateArgs {
8585
let db_result = migrate_database(&old_db, &new_db, self.dry_run).await?;
8686
println!("✓ Database: {}", db_result.message);
8787

88-
// Reload database connection after copying the file
89-
if !self.dry_run && db_result.bytes_copied > 0 {
90-
os.database = crate::database::Database::new().await?;
91-
}
92-
9388
// Migrate settings
9489
let settings_result = migrate_settings(&old_settings, &new_settings, self.dry_run).await?;
9590
println!("✓ Settings: {}", settings_result.message);
@@ -101,7 +96,9 @@ impl MigrateArgs {
10196
}
10297

10398
if !self.dry_run {
99+
os.database = crate::database::Database::new().await?;
104100
os.database.set_kiro_migration_completed()?;
101+
105102
println!("\n✓ Migration completed successfully!");
106103
} else {
107104
println!("\n(Dry run - no changes made)");

0 commit comments

Comments
 (0)