Skip to content

Commit 6eca4d3

Browse files
adnelsonxzyfer
authored andcommittedFeb 21, 2019
Update sass-graph.js
Emacs creates empty symlinks for files which are being edited. If these are encountered by the graph functionality, it crashes (including crashing a webpack-dev-server). I saw elsewhere in the code that stat errors are ignored -- not sure if this is the right approach, but it fixed my issue.
1 parent ff01ce0 commit 6eca4d3

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed
 

‎sass-graph.js

+3-1
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,9 @@ function Graph(options, dir) {
5252
if (dir) {
5353
var graph = this;
5454
_.each(glob.sync(dir+'/**/*.@('+this.extensions.join('|')+')', { dot: true, nodir: true, follow: this.follow }), function(file) {
55-
graph.addFile(path.resolve(file));
55+
try {
56+
graph.addFile(path.resolve(file));
57+
} catch (e) {}
5658
});
5759
}
5860
}

0 commit comments

Comments
 (0)
Please sign in to comment.