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

feat: better instructions on package manager installation failure #1504

Merged
merged 1 commit into from
Feb 14, 2022

Conversation

micalevisk
Copy link
Member

@micalevisk micalevisk commented Jan 24, 2022

PR Checklist

Please check if your PR fulfills the following requirements:

PR Type

What kind of change does this PR introduce?

[ ] Bugfix
[x] Feature
[ ] Code style update (formatting, local variables)
[x] Refactoring (no functional changes, no api changes)
[ ] Build related changes
[ ] CI related changes
[ ] Other... Please describe:

What is the current behavior?

Issue Number: close #1499

What is the new behavior?

display this message instead (taking PNPM as example):

🙀  Packages installation failed!
In case you don't see any errors above, consider manually running the failed command pnpm install to see more details on why it errored out

image

Also, I've replaced the --silent of PNPM by --reporter=silent (v6)

Does this PR introduce a breaking change?

[ ] Yes
[x] No

Other information

Instead of hard coding the full instalation command that might not be wrong by itself, I think is better to rely on the failed command.

As we couldn't access the binary name directly (nor its args) due to how it was defined on AbstractRunner abstract class and build the command by yourself, I've added another method on AbstractRunner class to expose a 'raw' version of some command

@micalevisk micalevisk force-pushed the issue-1499 branch 2 times, most recently from 00421b9 to 43cdfbc Compare February 12, 2022 03:56
@kamilmysliwiec
Copy link
Member

LGTM

@kamilmysliwiec kamilmysliwiec merged commit 9baaccf into nestjs:master Feb 14, 2022
@micalevisk micalevisk deleted the issue-1499 branch February 14, 2022 14:09
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 this pull request may close these issues.

Fresh install of NestJS global CLI and scaffolding a new yarn project fails
2 participants