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

Display more semantic text when rejecting an installation #585

Open
9romise opened this issue Dec 23, 2024 · 3 comments · May be fixed by #602
Open

Display more semantic text when rejecting an installation #585

9romise opened this issue Dec 23, 2024 · 3 comments · May be fixed by #602

Comments

@9romise
Copy link

9romise commented Dec 23, 2024

Env

node.js v22.12.0
corepack v0.30.0

Description

When corepack asks for installation, after I enter n, an error message is displayed.

throw new UsageError(`Aborted by the user`);

Image

@MikeMcC399
Copy link
Contributor

@9romise

Just as a suggestion for the future: if you post error logs, then posting text is better than posting screenshots, because text can be searched.

@9romise
Copy link
Author

9romise commented Jan 17, 2025

Just as a suggestion for the future: if you post error logs, then posting text is better than posting screenshots, because text can be searched.

Thanks for pointing that out and for the suggestion! I’ve updated the description.

@MikeMcC399
Copy link
Contributor

So the comment in the closed issue #601 does not get lost / overlooked:

@arcanis wrote:

It's a bug; UsageError instances are supposed to be "pretty printed" on abort, but in the case of the shims we bypass the Clipanion runner. We need to wrap executePackageManagerRequest into a try..catch and replace the error w/ process.stdout.write(cli.error(error)); return 1; (after hoisting const cli = new Cli outside of the if it's currently in).

@aduh95 aduh95 linked a pull request Jan 17, 2025 that will close this issue
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

Successfully merging a pull request may close this issue.

2 participants