feat(cli): ignore letter casing of commands

This commit is contained in:
Joakim Carlstein 2023-11-22 14:24:45 +01:00
parent 53cdb23237
commit 8f623efd45
2 changed files with 6 additions and 1 deletions

View file

@ -0,0 +1,5 @@
---
'@emigrate/cli': minor
---
Allow running commands no matter of the provided command's letter casing

View file

@ -245,7 +245,7 @@ const commands: Record<string, Action> = {
new: newMigration, new: newMigration,
}; };
const command = process.argv[2]; const command = process.argv[2]?.toLowerCase();
const action = command ? commands[command] : undefined; const action = command ? commands[command] : undefined;
if (!action) { if (!action) {