Fix bin/lessc
One more time, had to replace fs.open call with fs.readFile.
This commit is contained in:
parent
ef71bb0db2
commit
66887882f5
@ -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) {
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user