Skip to content


Don't join with CWD #16

jgallen23 opened this Issue · 2 comments

4 participants

[jga] ~: jsonlint /tmp/test.json 

        throw e; // process.nextTick error, or 'error' event on first tick
Error: EBADF, Bad file descriptor '/home/jga/tmp/test.json'
    at Object.openSync (fs.js:221:18)
    at Object.readFileSync (fs.js:112:15)
    at main (/usr/lib/node_modules/jsonlint/lib/cli.js:53:23)
    at Object.<anonymous> (/usr/lib/node_modules/jsonlint/lib/cli.js:93:1)
    at Module._compile (module.js:411:26)
    at Object..js (module.js:417:10)
    at Module.load (module.js:343:31)
    at Function._load (module.js:302:12)
    at Array.<anonymous> (module.js:430:10)
    at EventEmitter._tickCallback (node.js:126:26)

+1, this seems to prevent me from passing any absolute path to jsonlint.

@winhamwr winhamwr added a commit to winhamwr/jsonlint that referenced this issue
@winhamwr winhamwr Refs #16. Fixed CLI path parsing for absolute paths.
Now both absolute paths and paths relative to your CWD work. I tried to
add a test case for this, but I couldn't figure out a clean way to just
test the CLI options. Suggestions for this would be great if you think
a test is needed.

I have a pull request with a solution over at #18

@zaach zaach added a commit that referenced this issue
@zaach fix issue #16, normalize path 5cca035
@zaach zaach closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.