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

CLI: Version checking fails with versions of node.js greater than 0.9.x #378

Closed
HighTechnocrat opened this issue May 6, 2013 · 2 comments · Fixed by #379
Closed

CLI: Version checking fails with versions of node.js greater than 0.9.x #378

HighTechnocrat opened this issue May 6, 2013 · 2 comments · Fixed by #379

Comments

@HighTechnocrat
Copy link

The issue causes the cli to not return a negative value when it finds errors.

Starting from line 320:

//Workaround for nodejs/node-v0.x-archive#1669
if ((!process.stdout.flush || !process.stdout.flush()) && (parseFloat(process.versions.node) < 0.5)) {

Working fix (not extensively tested):

var verArr = process.versions.node.split('.');
var verMajor = parseInt(verArr[0]);

var verMinor = parseInt(verArr[1]);
var verPatch = parseInt(verArr[2]);
if ((!process.stdout.flush || !process.stdout.flush()) && (verMajor===0 && verMinor<5)) {

@ebednarz
Copy link

ebednarz commented May 7, 2013

Same here, node 0.10.5 & 0.11.0. Works with 0.9.9.

@nschonni
Copy link
Member

nschonni commented May 8, 2013

Maybe this checking should be removed since there have been 3 major release (0.6, 0.8, and 0.10) that aren't affected by this issue. This would need to accompany a bump in the engine version https://github.com/stubbornella/csslint/blob/master/npm/package.json#L10

nschonni added a commit to nschonni/csslint that referenced this issue Jun 5, 2013
- Removes workaround for node exit not properly flushing on 0.4 and
lower
- Add Travis test runs for each of the supported node version
Fixes CSSLint#378
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

Successfully merging a pull request may close this issue.

3 participants