diff --git a/lib/less/index.js b/lib/less/index.js index a74f4242..368f7d56 100644 --- a/lib/less/index.js +++ b/lib/less/index.js @@ -106,14 +106,14 @@ less.Parser.importer = function (file, paths, callback, env) { if (pathname) { fs.readFile(pathname, 'utf-8', function(e, data) { - if (e) sys.error(e); + if (e) return callback(e); - new(less.Parser)({ - paths: [path.dirname(pathname)].concat(paths), - filename: pathname - }).parse(data, function (e, root) { - callback(e, root, data); - }); + new(less.Parser)({ + paths: [path.dirname(pathname)].concat(paths), + filename: pathname + }).parse(data, function (e, root) { + callback(e, root, data); + }); }); } else { if (typeof(env.errback) === "function") {