Merge pull request #1974 from dominicbarnes/master

Change paths determination for CLI
This commit is contained in:
Luke Page
2014-05-02 10:41:01 +01:00

View File

@@ -192,8 +192,9 @@ less.Parser.fileLoader = function (file, currentFileInfo, callback, env) {
});
} else {
var paths = [currentFileInfo.currentDirectory].concat(env.paths);
paths.push('.');
var paths = [currentFileInfo.currentDirectory];
if (env.paths) paths.push.apply(paths, env.paths);
if (paths.indexOf('.') === -1) paths.push('.');
if (env.syncImport) {
for (var i = 0; i < paths.length; i++) {