doctorrustynelson / yearn

Override node's require mechanism.
MIT License
7 stars 3 forks source link

On UNC paths determineLegacyYearnLocation can get in to an infinite loop #85

Closed paulgoldsmith closed 9 years ago

paulgoldsmith commented 9 years ago

path.resolve can return the same path at https://github.com/doctorrustynelson/yearn/blob/master/lib/utils/yearn-utils.js#L107 if the directory is a UNC path (usually 3 directory levels down). Suggest adding defensive coding by ensuring root_location does change and breaking out of the loop if it does not.