Skip to content
Browse files

Removed support for node <0.8.

  • Loading branch information...
1 parent d6e4557 commit 90a36d43c6f3d64df2c1f82a88604b876e5bba24 @scottgonzalez committed Mar 5, 2013
Showing with 2 additions and 3 deletions.
  1. +2 −3 diff.js
View
5 diff.js
@@ -4,8 +4,7 @@ module.exports = function( args, fn ) {
var childArgs = args ? [ "diff" ].concat( args.split( /\s/ ) ) : [ "diff" ],
child = spawn( "git", childArgs ),
stdout = "",
- stderr = "",
- closeEvent = parseFloat( process.version.substring( 1 ) ) < 0.8 ? "exit" : "close";
+ stderr = "";
child.stdout.on( "data", function( chunk ) {
stdout += chunk;
@@ -15,7 +14,7 @@ module.exports = function( args, fn ) {
stderr += chunk;
});
- child.on( closeEvent, function( code ) {
+ child.on( "close", function( code ) {
if ( code !== 0 ) {
fn( new Error( stderr ) );
} else if ( !stdout.length ) {

0 comments on commit 90a36d4

Please sign in to comment.
Something went wrong with that request. Please try again.