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

normalizeFilename assumes matching path separators #1736

Closed
jcrice opened this issue Dec 17, 2013 · 2 comments
Closed

normalizeFilename assumes matching path separators #1736

jcrice opened this issue Dec 17, 2013 · 2 comments

Comments

@jcrice
Copy link

jcrice commented Dec 17, 2013

In lib /less/source-map-output.js at line 25:

    if (this._sourceMapBasepath && filename.indexOf(this._sourceMapBasepath) === 0) {

assumes that filename and _sourceMapBasepath are expressed using the same path separators. This may not be the case if sourceMapBasepath is specified through grunt-contrib-less and the Gruntfile is used on both Windows and *n.x. Normalizing this._sourceMapBasepath before the indexOf call would fix the problem.

Workaround: in the grunt-less-contrib options, set the sourceMapBasepath property using require('path').normalize(mySourceMapBasepath).

My env: LESS 1.5.0 called through grunt-contrib-less 0.8.1 running on Win 7 Enterprise SP1 64-bit. All paths specified in Gruntfile.js are written using '/' as a path separator.

@lukeapage
Copy link
Member

that should fix it I hope.

@jcrice
Copy link
Author

jcrice commented Dec 18, 2013

Quick response! Thank you very much.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants