public
/
UglifyJS.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b5c3253
)
Revert "Fixed reading from STDIN."
author
Mihai Bazon
<mihai@bazon.net>
Fri, 30 Nov 2012 09:33:50 +0000
(11:33 +0200)
committer
Mihai Bazon
<mihai@bazon.net>
Fri, 30 Nov 2012 09:33:50 +0000
(11:33 +0200)
It breaks usage like this:
echo '...code...' | uglifyjs
This reverts commit
e48802ad291fae5a16f2d23cbd25a0c433cdbe48
.
bin/uglifyjs
patch
|
blob
|
history
diff --git
a/bin/uglifyjs
b/bin/uglifyjs
index
d2fbdb1
..
1706629
100755
(executable)
--- 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");