ace icon indicating copy to clipboard operation
ace copied to clipboard

Missing `ace.hasCommand`

Open shiny opened this issue 1 year ago • 0 comments

Package version

@adonisjs/[email protected]

Describe the bug

There is a description in docs and a snippet code:

You may use the ace.hasCommand method to check if a command exists before executing it.

import ace from '@adonisjs/core/services/ace'

/**
 * Boot method will load commands (if not already loaded)
 */
await ace.boot()

if (ace.hasCommand('make:controller')) {
  await ace.exec('make:controller', [
    'user',
    '--resource',
  ])
}

But method hasCommand is not exists in ace actually.

Reproduction repo

No response

shiny avatar Apr 01 '24 08:04 shiny