Skip to content
This repository was archived by the owner on Jun 25, 2019. It is now read-only.

Conversation

@mrtnpm
Copy link
Contributor

@mrtnpm mrtnpm commented Jun 8, 2015

when running with no options, the first file's path is set on options and then propagated to subsequent files, which causes files with different paths to be processed with the incorrect path.

i.e. say we process 'index.css' and 'foo/bar.css' (in that order).
index.css will be processed relative to its path
foo/bar.css will be processed with index.css's path
the error is evident if foo/bar.css includes an import statements, which will be resolved relative to index.css rather than foo/bar.css

an issue remains if/when a user passes in any options, as the current code's options still take precedence over the current file's path, but that seemed to be the intent of the code, so it was left as is.

…closure, this to prevent the default options from being modified and propagated from call to call (i.e. options.from being set to file.path), resulting in the current file's path being ignored.
@MoOx
Copy link
Owner

MoOx commented Jun 8, 2015

Nice catch !

MoOx added a commit that referenced this pull request Jun 8, 2015
fix incorrect relative path when dealing with multiple files having different paths
@MoOx MoOx merged commit 918291d into MoOx:master Jun 8, 2015
@MoOx
Copy link
Owner

MoOx commented Jun 8, 2015

Released as 1.0.1

@vweevers vweevers mentioned this pull request Nov 10, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants