if (resource instanceof ResourceGroup) {
resources = ((ResourceGroup) resource).getResources();
} else {
resources = Arrays.asList(resource);
}
final Resource input = resources.get(0);
if (runWithNode()) {
return input.getResolver().resolve(
'/' + this.node.run(vfs, input.getPath(), options));
} else {
return ProcessorUtil.process(vfs, input, "less", "css",
new ProcessorCallback() {
@Override
public void call(final Reader reader, final Writer writer)
throws IOException {
LessjsProcessor.this.proxy.setResolver(input.getResolver());
try {
final StringWriter tempWriter = new StringWriter();
LessjsProcessor.this.executor.run(
new StringReader(input.getContents()), tempWriter);
writer.write(tempWriter.toString()
.replace(WIN_LOC_HREF_FIX, ""));
} finally {
LessjsProcessor.this.proxy.removeResolver();
}