Skip to content

Commit 9049204

Browse files
author
benholloway
committed
added fs.existsSync() before fs.statSync() to address crash caused by broken symlinks in node_modules
1 parent 3521063 commit 9049204

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/build/node-sass.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ function encodeRelativeURL(startPath, uri) {
4646
return path.join(basePath, filename);
4747
})
4848
.filter(function directoriesOnly(absolutePath) {
49-
return fs.statSync(absolutePath).isDirectory();
49+
return fs.existsSync(absolutePath) && fs.statSync(absolutePath).isDirectory();
5050
})
5151
.filter(function notInRootPath(absolutePath) {
5252
return (pathToRoot.indexOf(absolutePath) < 0);

0 commit comments

Comments
 (0)