Skip to content

Commit

Permalink
Changes helpers.fileExists to use regular stat instead of lstat.
Browse files Browse the repository at this point in the history
This fixes issue javanile#20 -- where you get "file not found" errors when the
target of an `$include` is a symlink to a file. Use of `stat` means the
system will follow these symlinks instead of returning information about
the link itself.
  • Loading branch information
tgockel committed Apr 18, 2019
1 parent 428eeb2 commit 0e6e0e1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ module.exports = {
* @returns {*}
*/
fileExists: function(file) {
return file && fs.existsSync(file) && fs.lstatSync(file).isFile();
return file && fs.existsSync(file) && fs.statSync(file).isFile();
},

/**
Expand Down

0 comments on commit 0e6e0e1

Please sign in to comment.