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