findup
findup copied to clipboard
Endless loop on windows and FindUp.sync
Related to: https://github.com/Filirom1/findup/issues/4 and https://github.com/Filirom1/findup/pull/5 Got that bug while working with gulp-rtlcss and tracked it down: https://github.com/Filirom1/findup/blob/master/index.js#L96 Demo repo: https://github.com/mgreter/bug-gulp-rtl-with-cwd
Boils down to the following:
var root = 'directory';
console.log('root 0: ', root);
root = Path.join(root, '..');
console.log('root 1: ', root);
root = Path.join(root, '..');
console.log('root 2: ', root);
root = Path.join(root, '..');
console.log('root 3: ', root);
Gives:
root 0: directory
root 1: .
root 2: ..
root 3: ..\..
Version:
$ node -v
v4.5.0