nova-command-runner icon indicating copy to clipboard operation
nova-command-runner copied to clipboard

Is adding command explicitly required?

Open jeroendelau opened this issue 1 year ago • 0 comments

I tried to add a Horizon Command, but I was not able to get it to run. It said "unable to find command". The command are available from the command line.

After explicitly registering the command in console/Kernel.php I was able to run them.

IE:

 protected function commands()
    {
        $this->load(__DIR__.'/Commands');
        $this->load(__DIR__.'/Commands');

        $this->registerCommand(app( PurgeCommand::class));
        $this->registerCommand(new ClearCommand());
        $this->registerCommand(app( PauseCommand::class));
        $this->registerCommand(app( ContinueCommand::class));
        
        require base_path('routes/console.php');
    }

Is this as intended? If so, we can add this to the README, happy to send in a PR if that is the case.

jeroendelau avatar Dec 09 '24 19:12 jeroendelau