My @include and @insert directives are not working as expected, and I
think this is because the compiler is unable to resolve the file
locations. It appears the compiler expects the locations given for
these directives to be relative to the 'CurrentWorkingDirectory' (i.e.
the path from which the compiler is run), rather than relative to the
main .less file which includes the directive.
Does this make sense? Is this by design, or is this a bug?
Actually I was able to fix this issue myself by adding the following
lines to dotless.Compiler -> Program.cs
var inputFilePath = arguments[0];
System.IO.Directory.SetCurrentDirectory(System.IO.Path.GetDirectoryName(System.IO.Path.GetFullPath(inputFilePath)));
inputFilePath = System.IO.Path.GetFileName(inputFilePath);
I tried getting this to work by looking at TreeBuilder.cs in the
dotless.Core project initially but couldn't get it to work....ymmv
Regards,
Darragh
On Mar 15, 1:33 pm, Daniel Hölbling <hoelblin...@gmail.com> wrote:
> Well .. sort of both.
> The code in question is shared between HttpHandler based approach and the
> compiler approach.
> I will write a fix that sets the current working directory to the location
> of the first .less file the compiler is executing.
> Thanks for highlighting that problem.
>
> greetings Daniel
>