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

Use offline cached version with yarn when it's possible #1423

Merged

Move logs to error handler

  • Loading branch information...
gaearon committed Feb 28, 2017
commit c9cece5e67cf8af1b4f208e67766c573aab8df7f
@@ -179,8 +179,6 @@ function install(useYarn, dependencies, verbose, isOnline) {
var child = spawn(command, args, {stdio: 'inherit'});
child.on('close', function(code) {
if (code !== 0) {
console.log();
console.error('Aborting installation.', chalk.cyan(command + ' ' + args.join(' ')), 'has failed.');
reject();
return;
}
@@ -226,6 +224,9 @@ function run(root, appName, version, verbose, originalDirectory, template) {
init(root, appName, verbose, originalDirectory, template);
})
.catch(function() {
console.log();
console.error('Aborting installation.', chalk.cyan(command + ' ' + args.join(' ')), 'has failed.');

This comment has been minimized.

Copy link
@voxsim

voxsim Feb 28, 2017

Author Contributor

I suggest to move it back command and args or pass command + ' ' + args.join(' ') as parameter of reject because it breaks here otherwise.

This comment has been minimized.

Copy link
@voxsim

voxsim Feb 28, 2017

Author Contributor

I am referring about this commit c9cece5

This comment has been minimized.

Copy link
@gaearon

gaearon Feb 28, 2017

Member

Yea, fixed.


// On 'exit' we will delete these files from target directory.
var knownGeneratedFiles = [
'package.json', 'npm-debug.log', 'yarn-error.log', 'yarn-debug.log', 'node_modules'
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.