LearnBoost/up — pull request #16 by shinuza (2012-03-05 02:04:09+00:00)
Title: Allow up to be invoked outside of a tty

If I launch this from a Makefile or a shell script:

```shell
$ nohup up server.js > foobar &
```

it fails with error

```
AssertionError: stdin must be initialized before calling setRawMode
at Object.setRawMode (tty.js:37:10)
at Object. (/Users/shinuza/Code/up/bin/up:176:5)
at Module._compile (module.js:441:26)
at Object..js (module.js:459:10)
at Module.load (module.js:348:31)
at Function._load (module.js:308:12)
at Array.0 (module.js:479:10)
at EventEmitter._tickCallback (node.js:192:40)
```

this pull request fixes this by testing if stdin is a tty prior trying to `setRawMode` on it.