corenova / yang-js

YANG parser and composer
Apache License 2.0
56 stars 18 forks source link

Is yang-js supported on windows platforms? #64

Closed sindhukothe closed 5 years ago

sindhukothe commented 7 years ago

I am trying to parse yangs on windows machine. It is going into infinite loop trying to resolve files in c:\package.json Looks the following loop in resolve() is causing the infinite loop:

while not found? and dir not in [ '/', '.' ]

On windows, we have to check for root directory differently as given in http://stackoverflow.com/questions/9652043/identifying-the-file-system-root-with-node-js

sekur commented 7 years ago

I haven't tested on windows, it'd be great if you can suggest the proper fix for detecting file system root within windows. I'm hesitant to fix it myself since I don't have a ready environment to verify the fix.