From 4d74a69277c9e4dfcae8fcf0f2ea981ed1fc57aa Mon Sep 17 00:00:00 2001 From: Cheng Zhao Date: Mon, 20 Jan 2014 21:50:37 +0800 Subject: [PATCH] Use nslog on Windows. --- src/browser/main.coffee | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/browser/main.coffee b/src/browser/main.coffee index cd3c144f5..bb24a5efa 100644 --- a/src/browser/main.coffee +++ b/src/browser/main.coffee @@ -7,16 +7,14 @@ fs = require 'fs' module = require 'module' path = require 'path' optimist = require 'optimist' -# TODO: NSLog is missing .lib on windows -nslog = require 'nslog' unless process.platform is 'win32' +nslog = require 'nslog' dialog = require 'dialog' console.log = (args...) -> # TODO: Make NSLog work as expected output = args.map((arg) -> JSON.stringify(arg)).join(" ") - if process.platform == 'darwin' - nslog(output) - else + nslog(output) + if process.platform isnt 'darwin' fs.writeFileSync('debug.log', output, flag: 'a') process.on 'uncaughtException', (error={}) ->