You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In @oclif/core, the parse function is async since v2 or so but plugins-legacy does not await on this function resulting in destructuring a Promise instead of an object.
class V5 extends Command {
async run() {
const color = require('@oclif/color').default;
const { args, argv, flags } = this.parse(this.constructor); // <-------------- this should be awaited
// ... rest of the class
This results in undefined values for args, argv, flags which throws after entering the command's run function.
The fix is const { args, argv, flags } = await this.parse(this.constructor);
The text was updated successfully, but these errors were encountered:
In @oclif/core, the parse function is
async
since v2 or so but plugins-legacy does not await on this function resulting in destructuring aPromise
instead of an object.This results in undefined values for
args, argv, flags
which throws after entering the command'srun
function.The fix is
const { args, argv, flags } = await this.parse(this.constructor);
The text was updated successfully, but these errors were encountered: