jshint exit code is not compatible with ant #1408

Closed
yiminghe opened this Issue Dec 10, 2013 · 2 comments

Comments

Projects
None yet
3 participants

when used in ant on windows8 / jdk7 / ant1.9 such as:

<exec executable="node" failonerror="true">
    <arg value="${node_modules.dir}/jshint/bin/jshint"/>
    <arg value="${component.src.dir}"/>
</exec>

ant will never fail, because it seems drain event of stdout is never fired but getBufferSize is not zero in cli.js

// Patch as per https://github.com/visionmedia/mocha/issues/333
// fixes issues with piped output on Windows.
// Root issue is here https://github.com/joyent/node/issues/3584
function exit() { process.exit(passed ? 0 : 2); }
try {
        if (exports.getBufferSize()) {
                process.stdout.once('drain', exit);
        } else {
                exit();
        }
} catch (err) {
        exit();
}

valueof added a commit that referenced this issue Feb 21, 2014

Issue #1542: Use exit module instead of process.exit. Fixes #1541 and #…
…1408.

Signed-off-by: Anton Kovalyov <anton@kovalyov.net>

valueof added a commit that referenced this issue Feb 21, 2014

Issue #1542: Use exit module instead of process.exit. Fixes #1541 and #…
…1408.

Signed-off-by: Anton Kovalyov <anton@kovalyov.net>

Conflicts:
	src/cli.js

@valueof valueof closed this Feb 21, 2014

Owner

valueof commented Feb 21, 2014

Fixed in #1542.

jugglinmike added a commit to jugglinmike/jshint that referenced this issue Oct 21, 2014

Issue #1542: Use exit module instead of process.exit. Fixes #1541 and #…
…1408.

Signed-off-by: Anton Kovalyov <anton@kovalyov.net>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment