title: Git pre-commit hook not running
body: <p>Here's my pre-commit hook:</p>
  
  <pre><code>#!/bin/sh
  exec node build.js
  </code></pre>
  
  <p>That code works fine when I change <code>pre-commit</code> to <code>pre-commit.sh</code> and run it, it also executes correctly when I just run <code>exec node build.js</code> in the terminal. The build file works fine.</p>
  
  <p>Here's <code>build.js</code>:</p>
  
  <pre><code>var fs = require("fs")
  var through2 = require('through2');
  var markdownPdf = require("markdown-pdf")
  var removeMarkdown = require("remove-markdown")
  
  var resume = fs.createReadStream("README.md")
  var pdf = fs.createWriteStream("Resume - Desmond Weindorf.pdf")
  var txt = fs.createWriteStream("Resume - Desmond Weindorf.txt")
  var md = fs.createWriteStream("Resume - Desmond Weindorf.md")
  
  process.stdout.write('Building other file types...\n')
  
  // pdf
  resume.pipe(markdownPdf({ paperBorder: "1.4cm" })).pipe(pdf)
  
  // txt
  resume.pipe(through2(function(line, _, next) {
      this.push(removeMarkdown(line.toString()) + '\n');
      next()
  })).pipe(txt)
  
  // md
  resume.pipe(md)
  </code></pre>
  
  <p>I thought it might be ending prematurely (and probably is) before the new files are written to, but the terminal should still display the initial write output in that case.</p>
  
  <p>This was my output on a commit (the pdf was changed beforehand to test if it was overwriting with new changes):</p>
  
  <pre><code>Desmonds-MacBook-Pro:resume desmond$ git commit -am "updated resume"
  [master 7faab35] updated resume
   4 files changed, 36 insertions(+), 34 deletions(-)
   rewrite Resume - Desmond Weindorf.pdf (81%)
  </code></pre>
  
  <p>What am I doing wrong here?</p>