Commit 0ebf701c by Adeel

CLI: Redirects output to stdout on stdin input.

Fixes #568.
parent 21ac22e4
...@@ -240,6 +240,7 @@ if (options.src) { ...@@ -240,6 +240,7 @@ if (options.src) {
} else if (!process.stdin.isTTY) { } else if (!process.stdin.isTTY) {
stdin(function(data) { stdin(function(data) {
options.data = data; options.data = data;
options.stdin = true;
run(options, emitter); run(options, emitter);
}); });
} }
......
...@@ -39,7 +39,7 @@ module.exports = function(options, emitter) { ...@@ -39,7 +39,7 @@ module.exports = function(options, emitter) {
} }
}; };
if (options.stdout || (!options.dest && !process.stdout.isTTY)) { if (options.stdout || (!options.dest && !process.stdout.isTTY) || options.stdin) {
emitter.emit('log', css); emitter.emit('log', css);
return done(); return done();
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment