Use dummy stdin stream on Windows.
This commit is contained in:
parent
5787b4cd6f
commit
30c9cd4318
1 changed files with 8 additions and 2 deletions
|
@ -1,12 +1,18 @@
|
||||||
fs = require 'fs'
|
fs = require 'fs'
|
||||||
path = require 'path'
|
path = require 'path'
|
||||||
|
|
||||||
# Redirect node's console to use our own implementations, since node can not
|
|
||||||
# handle output when running as GUI program.
|
|
||||||
if process.platform is 'win32'
|
if process.platform is 'win32'
|
||||||
|
# Redirect node's console to use our own implementations, since node can not
|
||||||
|
# handle output when running as GUI program.
|
||||||
console.log = console.error = console.warn = process.log
|
console.log = console.error = console.warn = process.log
|
||||||
process.stdout.write = process.stderr.write = process.log
|
process.stdout.write = process.stderr.write = process.log
|
||||||
|
|
||||||
|
# Always returns EOF for stdin stream.
|
||||||
|
Readable = require('stream').Readable
|
||||||
|
stdin = new Readable
|
||||||
|
stdin.push null
|
||||||
|
process.__defineGetter__ 'stdin', -> stdin
|
||||||
|
|
||||||
# Provide default Content API implementations.
|
# Provide default Content API implementations.
|
||||||
atom = {}
|
atom = {}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue