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

fix command path in upgrade/index.js for windows users #6167

Merged
merged 3 commits into from
Jul 26, 2017

Conversation

iconben
Copy link
Contributor

@iconben iconben commented Jul 24, 2017

Fix #6161

@@ -79,7 +79,8 @@ module.exports = UpgradeGenerator.extend({
this.log(`Regenerating application with JHipster ${version}...`);
let generatorCommand = 'yo jhipster';
if (semver.gte(version, FIRST_CLI_SUPPORTED_VERSION)) {
generatorCommand = this.clientPackageManager === 'yarn' ? '$(yarn bin)/jhipster' : '$(npm bin)/jhipster';
const generatorDir = this.clientPackageManager === 'yarn' ? shelljs.exec('yarn bin') : shelljs.exec('npm bin');
Copy link
Contributor

@gmarziou gmarziou Jul 24, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would turn off console output:

shelljs.exec('yarn bin', {silent: true})

Copy link
Contributor

@gmarziou gmarziou Jul 24, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also according to the doc sync exec should use stdout, though it seems to work without it.

shelljs.exec('yarn bin', {silent: true}).stdout;

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh yes, forgot to do that, thanks.

@iconben
Copy link
Contributor Author

iconben commented Jul 25, 2017

@gmarziou thanks for review comments. Not sure if you mean you'll change the code by yourself or need my follow-up. Guess you guys are busy so anyway I did the change to save your time.
Best Regards.

@@ -79,7 +79,8 @@ module.exports = UpgradeGenerator.extend({
this.log(`Regenerating application with JHipster ${version}...`);
let generatorCommand = 'yo jhipster';
if (semver.gte(version, FIRST_CLI_SUPPORTED_VERSION)) {
generatorCommand = this.clientPackageManager === 'yarn' ? '$(yarn bin)/jhipster' : '$(npm bin)/jhipster';
const generatorDir = this.clientPackageManager === 'yarn' ? shelljs.exec('yarn bin', { silent: true }).stdout : shelljs.exec('npm bin', { silent: true }).stdout;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please change { silent: true } to { silent: this.silent } so that the --verbose flag will print the result of the command (this is how the rest of the shelljs commands in this file are set up)

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.

4 participants