Skip to content

Commit 05a6199

Browse files
committed
fix(migrate): skip autoMigrate when running migrate command
Prevents double migration message when user explicitly runs 'ccs migrate --dry-run' - autoMigrate was triggering real migration before the migrate command handler ran.
1 parent 0d70708 commit 05a6199

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/ccs.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -203,8 +203,11 @@ async function main(): Promise<void> {
203203
const args = process.argv.slice(2);
204204

205205
// Auto-migrate to unified config format (silent if already migrated)
206-
const { autoMigrate } = await import('./config/migration-manager');
207-
await autoMigrate();
206+
// Skip if user is explicitly running migrate command
207+
if (args[0] !== 'migrate') {
208+
const { autoMigrate } = await import('./config/migration-manager');
209+
await autoMigrate();
210+
}
208211

209212
// Special case: version command (check BEFORE profile detection)
210213
const firstArg = args[0];

0 commit comments

Comments
 (0)