Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix issue 2508 #2510

Merged
merged 3 commits into from
Mar 19, 2015
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 17 additions & 4 deletions bin/lessc
Original file line number Diff line number Diff line change
Expand Up @@ -270,12 +270,25 @@ function printUsage() {
return;
}

var input = args[1];
// If input filenames are surrounded in quotes here, strip the quotes.
// Bug #2508
var filenames = [args[1], args[2]].map(function (arg) {
var match;

match = arg.match(/^'(.+)'$/);
if (match) {
return match[1];
} else {
return arg;
}
});

var input = filenames[0];
if (input && input != '-') {
input = path.resolve(process.cwd(), input);
}
var output = args[2];
var outputbase = args[2];
var output = filenames[1];
var outputbase = filenames[1];
if (output) {
output = path.resolve(process.cwd(), output);
}
Expand Down Expand Up @@ -481,4 +494,4 @@ function printUsage() {
parseLessFile(false, buffer);
});
}
})();
})();