Skip to content

Commit

Permalink
fixes #64, make yang-js to support windows platform. (#82)
Browse files Browse the repository at this point in the history
Awesome, thanks @quantang!
  • Loading branch information
quantang authored and sekur committed Nov 14, 2018
1 parent ad780cb commit c841cf6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/yang.litcoffee
Original file line number Diff line number Diff line change
Expand Up @@ -129,8 +129,8 @@ same folder that the `resolve` request was made: `#{name}.yang`.
dir = from = switch
when from.length then from[0]
else path.resolve()
while not found? and dir not in [ '/', '.' ]
target = "#{dir}/package.json"
while not found? and dir != path.dirname dir
target = path.resolve dir, "package.json"
debug? "[resolve] #{name} in #{target}"
try
pkginfo = require(target)
Expand Down

0 comments on commit c841cf6

Please sign in to comment.