aboutsummaryrefslogtreecommitdiff
path: root/bin/uglifyjs
diff options
context:
space:
mode:
authorMihai Bazon <mihai@bazon.net>2012-11-30 11:33:50 +0200
committerMihai Bazon <mihai@bazon.net>2012-11-30 11:33:50 +0200
commitdbe33bbfc53badf7135d0aa93b7cdac708175629 (patch)
treefdf7456ea5db3d459688152bf075d08109e4d031 /bin/uglifyjs
parentb5c3253b493b9e2428d5702169e5687f42fc6213 (diff)
downloadtracifyjs-dbe33bbfc53badf7135d0aa93b7cdac708175629.tar.gz
tracifyjs-dbe33bbfc53badf7135d0aa93b7cdac708175629.zip
Revert "Fixed reading from STDIN."
It breaks usage like this: echo '...code...' | uglifyjs This reverts commit e48802ad291fae5a16f2d23cbd25a0c433cdbe48.
Diffstat (limited to 'bin/uglifyjs')
-rwxr-xr-xbin/uglifyjs5
1 files changed, 3 insertions, 2 deletions
diff --git a/bin/uglifyjs b/bin/uglifyjs
index d2fbdb18..1706629c 100755
--- a/bin/uglifyjs
+++ b/bin/uglifyjs
@@ -335,8 +335,9 @@ function getOptions(x, constants) {
function read_whole_file(filename) {
if (filename == "-") {
- var size = fs.fstatSync(process.stdin.fd).size;
- return size > 0 ? fs.readSync(process.stdin.fd, size)[0] : "";
+ // XXX: this sucks. How does one read the whole STDIN
+ // synchronously?
+ filename = "/dev/stdin";
}
try {
return fs.readFileSync(filename, "utf8");