Skip to content

Commit a8d561d

Browse files
committed
fix: resolve duplicate requiredOption and broken switch fallthrough (#53)
Fix three issues from bad merge of gemini + codex adapters: - Duplicate .requiredOption() calls on export and import commands - case 'codex' placed after default: with no break (unknown formats fell through into codex handler) - Broken indentation on gemini/codex case blocks Fixes #53
1 parent cf029df commit a8d561d

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

src/commands/export.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -74,12 +74,12 @@ export const exportCommand = new Command('export')
7474
case 'gemini':
7575
result = exportToGeminiString(dir);
7676
break;
77-
default:
78-
error(`Unknown format: ${options.format}`);
79-
info('Supported formats: system-prompt, claude-code, openai, crewai, openclaw, nanobot, lyzr, github, copilot, opencode, cursor, gemini');
8077
case 'codex':
8178
result = exportToCodexString(dir);
82-
info('Supported formats: system-prompt, claude-code, openai, crewai, openclaw, nanobot, lyzr, github, copilot, opencode, cursor, codex');
79+
break;
80+
default:
81+
error(`Unknown format: ${options.format}`);
82+
info('Supported formats: system-prompt, claude-code, openai, crewai, openclaw, nanobot, lyzr, github, copilot, opencode, cursor, gemini, codex');
8383
process.exit(1);
8484
}
8585

src/commands/import.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -548,12 +548,12 @@ export const importCommand = new Command('import')
548548
case 'gemini':
549549
importFromGemini(sourcePath, targetDir);
550550
break;
551-
default:
552-
error(`Unknown format: ${options.from}`);
553-
info('Supported formats: claude, cursor, crewai, opencode, gemini');
554551
case 'codex':
555552
importFromCodex(sourcePath, targetDir);
556-
info('Supported formats: claude, cursor, crewai, opencode, codex');
553+
break;
554+
default:
555+
error(`Unknown format: ${options.from}`);
556+
info('Supported formats: claude, cursor, crewai, opencode, gemini, codex');
557557
process.exit(1);
558558
}
559559

0 commit comments

Comments
 (0)