Skip to content
This repository was archived by the owner on Jul 24, 2024. It is now read-only.

renderSync() doesn't exit the node process if an importer() function is provided. #794

Closed
aputinski opened this issue Mar 24, 2015 · 7 comments

Comments

@aputinski
Copy link

In both 2.0.1 and 3.0.0-alpha.0, calling renderSync() with a custom importer() function works as expected, but causes the node process to never exit. This happens on node 0.10.36 as well as 0.12.0. No errors are thrown and the correct result is returned.

This works fine:

var sass = require('node-sass');
var result = sass.renderSync({
  data: '.foo{background:red;}'
});
console.log(result.css);

This gives the same result, but never exits the node process (even though the importer isn't being used):

var sass = require('node-sass');
var result = sass.renderSync({
  data: '.foo{background:red;}',
  importer: function(url, prev) {
    return {
      contents: '.bar{background:blue;}'
    };
  }
});
console.log(result.css);
@aputinski aputinski changed the title renderSync doesn't exit the node process if an importer function is provided. renderSync() doesn't exit the node process if an importer() function is provided. Mar 24, 2015
@am11
Copy link
Contributor

am11 commented Mar 24, 2015

Are you using Windows?

@aputinski
Copy link
Author

@am11 I'm on OSX 10.10.2

@am11
Copy link
Contributor

am11 commented Mar 24, 2015

Alright. This entire feature is rewritten and will be released with the upcoming beta. If it is still an issue, I will dive deeper.
Thanks for reporting it!

@saper
Copy link
Member

saper commented Apr 4, 2015

Works for me using FreeBSD with node 0.12, libsass 3.2.0-beta.2, node-sass 3.0.0-beta.4

@xzyfer
Copy link
Contributor

xzyfer commented Apr 22, 2015

@aputinski can you please confirm whether this is still an issue with [email protected]?

@aputinski
Copy link
Author

@xzyfer Just tried the above code with 3.0.0-beta.7 and everything seems to be working as expected. Thanks!

@xzyfer
Copy link
Contributor

xzyfer commented Apr 22, 2015

Thanks @aputinski!

@xzyfer xzyfer closed this as completed Apr 22, 2015
jiongle1 pushed a commit to scantist-ossops-m2/node-sass that referenced this issue Apr 7, 2024
Fix bug with options not being copied correctly
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants