             done(err)
             return
           )
-          .on('data', (data) ->
+          child.stdout.on('data', (data) ->
             abort = true
             process.stdout.write(data)
             return

        (done) ->
          # Ensure we are committing the master
          name = ''
          exec('git', ['status', '--porcelain'], { stdio: [process.stdin, 'pipe', process.stderr] }, (err) ->
            if not err? and name != 'master'
              err = new Error('Current branch is not master. Please only distribute from master.')
            if err?

        (done) ->
          # Ensure no changes
          abort = false
          child = exec('git', ['status', '--porcelain'], { stdio: [process.stdin, 'pipe', process.stderr] }, (err) ->
            if not err? and abort
              err = new Error('Changes detected. Please ensure the staging area is clean before running')
            if err?
