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

Dereferencing fails on Windows with CWD C: #39

Closed
morris opened this issue Apr 24, 2017 · 1 comment
Closed

Dereferencing fails on Windows with CWD C: #39

morris opened this issue Apr 24, 2017 · 1 comment
Labels

Comments

@morris
Copy link

morris commented Apr 24, 2017

To reproduce, create test.js somewhere:

var parser = require( 'json-schema-ref-parser' );
var path = require( 'path' );

parser.dereference( path.join( __dirname, 'test.yaml' ) );

Running test.js from cmd in working directory C:\ fails, running in C:\Users behaves correctly:

C:\>node C:\Users\me\workspace\json-schema-ref-parser-bug-cwd-c\test.js
(node:8048) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejec
tion id: 5): SyntaxError: Unable to resolve $ref pointer "c:///Users/me/
workspace/json-schema-ref-parser-bug-cwd-c/test.yaml"

C:\>cd Users

C:\Users>node C:\Users\me\workspace\json-schema-ref-parser-bug-cwd-c\tes
t.js
(node:9092) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejec
tion id: 4): SyntaxError: "c:/Users/me/workspace/json-schema-ref-parser-
bug-cwd-c/test.yaml" is not a valid JSON Schema
@JamesMessinger
Copy link
Member

Oh wow, thanks! Good catch! I'll get this fixed

@jonluca jonluca closed this as completed Mar 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants