Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

program.on behaviour seems to be broken in v2.11.0 #660

Closed
deepu105 opened this issue Jul 17, 2017 · 6 comments
Closed

program.on behaviour seems to be broken in v2.11.0 #660

deepu105 opened this issue Jul 17, 2017 · 6 comments

Comments

@deepu105
Copy link

The below snippet which used to work with v2.10.0 seems to be broken in v2.11.0 it doesn't do anything now

program.on('*', (name) => {
        console.log(name);
        process.exit(1);
    });

Actual usage in JHipster CLI

program.on('*', (name) => {
        logger.error(`${chalk.yellow(name)} is not a known command. See '${chalk.white(`${cliName} --help`)}'.`);

        const d = didYouMean(name.toString(), program.commands, '_name');

        if (d) {
            logger.info(`Did you mean: ${chalk.yellow(d)}?`);
        }

        process.exit(1);
    });
@roman-vanesyan
Copy link
Collaborator

Yeah, we break compatibility in v2.11. * event renamed to command:*. Sorry for that.

@roman-vanesyan
Copy link
Collaborator

see #659 for more details

@deepu105
Copy link
Author

Thanks for the update.

@madjam002
Copy link

This should not be closed. Can this not be fixed for 2.10 and the breaking change be moved to a version 3 release?

@roman-vanesyan
Copy link
Collaborator

@madjam002 this is a dup of #659.

@roman-vanesyan
Copy link
Collaborator

Unfortunately we cannot push things back as 2.11 already released, and we cannot delete versions from npm. Plus things already done, no way to re-inverting wheels, sorry for that :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants