Skip to content

Commit 7161039

Browse files
committed
Verbose if isatty
1 parent 8de278d commit 7161039

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/pimscript.coffee

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
fs = require 'fs'
22
vm = require 'vm'
33
util = require 'util'
4+
tty = require 'tty'
45
parser = require("uglify-js").parser
56
uglify = require("uglify-js").uglify
67
ctx = vm.createContext()
@@ -9,6 +10,8 @@ vm.runInContext fs.readFileSync(__dirname + "/../JSLint/jslint.js"), ctx
910
JSLINT = ctx.JSLINT
1011

1112
VERBOSE = false
13+
if tty.isatty(process.stdout.fd)
14+
VERBOSE = true
1215

1316
if process.argv.length < 4
1417
console.error JSON.stringify {errors:[{id:"NOARGS"}]}

0 commit comments

Comments
 (0)