Fix bin/lessc

One more time, had to replace fs.open call with fs.readFile.
This commit is contained in:
Felix Geisendörfer 2010-10-05 17:02:14 +08:00 committed by Alexis Sellier
parent ef71bb0db2
commit 66887882f5

View File

@ -62,13 +62,12 @@ if (! input) {
process.exit(1);
}
fs.stat(input, function (e, stats) {
fs.readFile(input, 'utf-8', function (e, data) {
if (e) {
sys.puts("lessc: " + e.message);
process.exit(1);
}
fs.open(input, process.O_RDONLY, stats.mode, function (e, fd) {
fs.read(fd, stats.size, 0, "utf8", function (e, data) {
new(less.Parser)({
paths: [path.dirname(input)],
optimization: options.optimization,
@ -93,6 +92,3 @@ fs.stat(input, function (e, stats) {
}
});
});
});
});