Core: Handle commands

Created on 19 Apr 2017  路  5Comments  路  Source: adonisjs/core

How to run console commands from code like Artisan:call(...)?

Most helpful comment

馃憢

const ace = require('@adonisjs/ace')

await ace.call('migration:run')

All 5 comments

@enniel do you ever solved it? Just including the command and running its handle method is limitating, 'cause you can't pass arguments. @thetutlage

馃憢

const ace = require('@adonisjs/ace')

await ace.call('migration:run')

Does it work only with "default" ace commands? It tells me that my command "is not a registered command", but from terminal it works.

I'm having the same problem with @danilopolani "is not registered command"

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

blendsoft picture blendsoft  路  3Comments

begueradj picture begueradj  路  3Comments

GianCastle picture GianCastle  路  3Comments

umaams picture umaams  路  3Comments

aligoren picture aligoren  路  4Comments