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

Failed generator installs should not finish with confirmative log #226

Open
kontur opened this issue Oct 27, 2014 · 5 comments
Open

Failed generator installs should not finish with confirmative log #226

kontur opened this issue Oct 27, 2014 · 5 comments

Comments

@kontur
Copy link

kontur commented Oct 27, 2014

Hey,

when you try install a generator and yo fails to install the generator (in my case because it needs to run the npm installs with sudo) it still gives you a confirmative log, which is contradictory.

npm ERR! Please try running this command again as root/Administrator.
...
npm ERR! ...
npm ERR! ...
npm ERR! not ok code 0


I just installed a generator by running:

    npm install -g generator-angular

This is happening on yo 1.3.3 Mac OS X.

@SBoudrias
Copy link
Member

Side note:

in my case because it needs to run the npm installs with sudo

That is a false assumption, you should actually fix you npm permissions: https://github.com/sindresorhus/guides/blob/master/npm-global-without-sudo.md

About the issue reported, I agree.

@addyosmani
Copy link
Member

@SBoudrias Looks like we need to improve post-close behavior in https://github.com/yeoman/yo/blob/master/lib/routes/install.js#L130 to correct this. I agree we should only display the installation success message when we 100% know there hasn't been a failure somewhere else in the pipeline.

@SBoudrias
Copy link
Member

Yeah. Also, maybe this should actually be fixed in yeoman-generator with a help/troubleshoot message if npmInstall fails.

@sindresorhus
Copy link
Member

Also, maybe this should actually be fixed in yeoman-generator with a help/troubleshoot message if npmInstall fails.

👍

@addyosmani
Copy link
Member

👍

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

No branches or pull requests

4 participants