title: github GUI client /dev/tty: Device not configured
body: <p>I have this pre-commit hook in .git/hooks/pre-commit</p>
  
  <pre><code>#!/bin/bash
  for file in `git diff --name-only`
  do
    if [[ $file =~ /pom\.xml$ ]]; then
      exec &lt; /dev/tty
      read -p "Committing $file is often a mistake; are you sure you want to do that? (Y/[N]): " ans
      exec &lt;&amp;-
      if [[ $ans =~ ^[Yy]$ ]]; then
        echo proceeding rashly with commit...
      else
        echo aborting commit, O prudent one.
        exit 1
      fi
    fi
  done
  </code></pre>
  
  <p>When I use github for mac (GUI client) to commit, it shows this error:</p>
  
  <pre><code>.git/hooks/pre-commit: line 5: /dev/tty: Device not configured
  aborting commit, O prudent one.
   (1)
  </code></pre>
  
  <p>It works on command line. But I hope to get the GUI client to work. Any ideas? Thanks!</p>