Pinpickle / tight

Bolt boilerplate generator
15 stars 0 forks source link

Need to check that Composer is installed globally before trying to use it #16

Closed mdcanham closed 9 years ago

mdcanham commented 9 years ago

If Composer is not installed we get the following error:

Running composer install
events.js:85
      throw er; // Unhandled 'error' event
            ^
Error: spawn composer ENOENT
    at exports._errnoException (util.js:746:11)
    at Process.ChildProcess._handle.onexit (child_process.js:1053:32)
    at child_process.js:1144:20
    at process._tickCallback (node.js:355:11)
Pinpickle commented 9 years ago

We do make a note is made of this in the readme:

You're going to need to have the command line version of Composer installed (so no php composer.phar business), and Node.js/npm. This uses Yeoman and Gulp (and potentially Bower), so you're going to want to have those installed.

However, this does lead to a crash mid generator, which is all kinds of bad so a check should be done before the generator starts. The bigger issue is with Bower as this it necessarily required but that can only be determined when the user reaches theme generation and answers config. Users shouldn't be forced to install software they don't actually need.

The same goes for #17