8000 Merge branch 'master' of github.com:cloudhead/less.js · rusongyu/less.js@ad12a98 · GitHub
[go: up one dir, main page]

Skip to content

Commit ad12a98

Browse files
committed
Merge branch 'master' of github.com:cloudhead/less.js
2 parents 031006d + 62ce2e0 commit ad12a98

File tree

1 file changed

+9
-10
lines changed

1 file changed

+9
-10
lines changed

bin/lessc

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22

33
var path = require('path'),
44
fs = require('fs'),
5-
sys = require('util');
5+
sys = require('util'),
6+
os = require('os');
67

78
var less = require('../lib/less');
89
var args = process.argv.slice(1);
@@ -53,12 +54,10 @@ args = args.filter(function (arg) {
5354
options.color = false;
5455
break;
5556
case 'include-path':
56-
options.paths = match[2].split(':')
57+
options.paths = match[2].split(os.type().match(/Windows/) ? ';' : ':')
5758
.map(function(p) {
58-
if (p && p[0] == '/') {
59-
return path.join(path.dirname(input), p);
60-
} else if (p) {
61-
return path.join(process.cwd(), p);
59+
if (p) {
60+
return path.resolve(process.cwd(), p);
6261
}
6362
});
6463
break;
@@ -69,12 +68,12 @@ args = args.filter(function (arg) {
6968
});
7069

7170
var input = args[1];
72-
if (input && input[0] != '/' && input != '-' && input[1] != ':') {
73-
input = path.join(process.cwd(), input);
71+
if (input && input != '-') {
72+
input = path.resolve(process.cwd(), input);
7473
}
7574
var output = args[2];
76-
if (output && output[0] != '/' && input[1] != ':') {
77-
output = path.join(process.cwd(), output);
75+
if (output) {
76+
output = path.resolve(process.cwd(), output);
7877
}
7978

8079
var css, fd, tree;

0 commit comments

Comments
 (0)
0