Closed alexeymarunin closed 4 years ago
Hi
I found a little bug for custom command if it returns non-Promise value
const { ServiceBroker } = require("moleculer"); const broker = new ServiceBroker({ replCommands: [ { command: "hello [<name>]", description: "Say hello", alias: "hi", types: { string: ["name"] }, action(broker, args, helpers) { console.log("Hi, " + helpers.kleur.green(args.name || "stranger")); return args.name; } } ] }); broker.repl();
According Vorpal documentation, command's action should call done() in the end or return Promise.
done()
Promise
PS May be this bug relates with #22
Hi
I found a little bug for custom command if it returns non-Promise value
According Vorpal documentation, command's action should call
done()
in the end or returnPromise
.PS May be this bug relates with #22