diff --git a/package-lock.json b/package-lock.json index 82018f9..f259f22 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@athenna/artisan", - "version": "3.7.0", + "version": "3.7.1", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@athenna/artisan", - "version": "3.7.0", + "version": "3.7.1", "license": "MIT", "dependencies": { "chalk-rainbow": "^1.0.0", diff --git a/package.json b/package.json index 3d53897..2b6132b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@athenna/artisan", - "version": "3.7.0", + "version": "3.7.1", "description": "The Athenna CLI application. Built on top of commander and inspired in @adonisjs/ace.", "license": "MIT", "author": "João Lenon ", diff --git a/src/Kernels/ConsoleKernel.ts b/src/Kernels/ConsoleKernel.ts index 1838670..7a787f5 100644 --- a/src/Kernels/ConsoleKernel.ts +++ b/src/Kernels/ConsoleKernel.ts @@ -28,9 +28,15 @@ export class ConsoleKernel { /** * If the command is not inside "rc.commands", then it * means that is registered using route file or does not exist. + * + * Commander does not throw errors when a command does not exist + * and there are any command registered in the application. To + * avoid this behavior we are going to register all commands of + * "rc.commands" when the command is using route file or does not + * exist. */ if (!command) { - return + return this.registerAllCommands() } const path = command.path || command