Skip to content

Commit

Permalink
Merge branch 'master' of github.com:cloudhead/less.js
Browse files Browse the repository at this point in the history
  • Loading branch information
cloudhead committed Jan 19, 2012
2 parents 031006d + 62ce2e0 commit ad12a98
Showing 1 changed file with 9 additions and 10 deletions.
19 changes: 9 additions & 10 deletions bin/lessc
Expand Up @@ -2,7 +2,8 @@

var path = require('path'),
fs = require('fs'),
sys = require('util');
sys = require('util'),
os = require('os');

var less = require('../lib/less');
var args = process.argv.slice(1);
Expand Down Expand Up @@ -53,12 +54,10 @@ args = args.filter(function (arg) {
options.color = false;
break;
case 'include-path':
options.paths = match[2].split(':')
options.paths = match[2].split(os.type().match(/Windows/) ? ';' : ':')
.map(function(p) {
if (p && p[0] == '/') {
return path.join(path.dirname(input), p);
} else if (p) {
return path.join(process.cwd(), p);
if (p) {
return path.resolve(process.cwd(), p);
}
});
break;
Expand All @@ -69,12 +68,12 @@ args = args.filter(function (arg) {
});

var input = args[1];
if (input && input[0] != '/' && input != '-' && input[1] != ':') {
input = path.join(process.cwd(), input);
if (input && input != '-') {
input = path.resolve(process.cwd(), input);
}
var output = args[2];
if (output && output[0] != '/' && input[1] != ':') {
output = path.join(process.cwd(), output);
if (output) {
output = path.resolve(process.cwd(), output);
}

var css, fd, tree;
Expand Down

0 comments on commit ad12a98

Please sign in to comment.