diff --git a/sources/advanced/Cli.ts b/sources/advanced/Cli.ts index ffe02d8..03b4e04 100644 --- a/sources/advanced/Cli.ts +++ b/sources/advanced/Cli.ts @@ -397,6 +397,10 @@ export class Cli implements Omit) { + if (this.registrations.has(commandClass)) { + throw new RangeError(`${commandClass.name} has already been registered`); + } + const specs = new Map>(); const command = new commandClass();