mirror of
https://github.com/tiennm99/ccs.git
synced 2026-07-16 10:16:49 +00:00
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.
This commit is contained in:
+5
-2
@@ -203,8 +203,11 @@ async function main(): Promise<void> {
|
||||
const args = process.argv.slice(2);
|
||||
|
||||
// Auto-migrate to unified config format (silent if already migrated)
|
||||
const { autoMigrate } = await import('./config/migration-manager');
|
||||
await autoMigrate();
|
||||
// Skip if user is explicitly running migrate command
|
||||
if (args[0] !== 'migrate') {
|
||||
const { autoMigrate } = await import('./config/migration-manager');
|
||||
await autoMigrate();
|
||||
}
|
||||
|
||||
// Special case: version command (check BEFORE profile detection)
|
||||
const firstArg = args[0];
|
||||
|
||||
Reference in New Issue
Block a user