benderjs / browser-launcher2

☠ This package is no longer maintained ☠
Other
24 stars 13 forks source link

ENOTDIR on spawn exits app #53

Open cdaringe opened 8 years ago

cdaringe commented 8 years ago

hello:

currently checkOthers does the following:

function checkOthers( name, callback ) {
    var process = spawn( name, [ '--version' ] ),
        re = browsers[ name ].re,
        data = '';

    process.stdout.on( 'data', function( buf ) {
        data += buf;
    } );

however, the spawn command can fail with ENOTDIR. see https://github.com/node-inspector/node-inspector/issues/807 for more on that (and see this libs failure output). an update to the spawn call as follows solves my issue:

function checkOthers( name, callback ) {
    try {
        var process = spawn( name, [ '--version' ] ),
              re = browsers[ name ].re,
              data = '';
    } catch(err) {
      return callback(err)
    }

thanks

mitchhentges commented 8 years ago

This should be fixed in browser-launcher2 once #30 is merged